Compare commits

...

4 Commits

Author SHA1 Message Date
Imran Remtulla
eeadbce8b0 Merge pull request #466 from ImranR98/dev
Increment version, update packages
2023-04-13 23:06:22 -04:00
Imran Remtulla
ce8aeff342 Increment version, update packages 2023-04-13 23:06:08 -04:00
Imran Remtulla
0d8362a2ed Merge pull request #465 from Bnyro/amoled-theme
Add an amoled black theme
2023-04-13 22:59:54 -04:00
Bnyro
3b28143a4e Add an amoled black theme 2023-04-13 18:19:24 +02:00
13 changed files with 46 additions and 10 deletions

View File

@@ -122,6 +122,7 @@
"followSystem": "System folgen",
"obtainium": "Obtainium",
"materialYou": "Material You",
"useBlackTheme": "Use pure black dark theme",
"appSortBy": "App sortieren nach",
"authorName": "Autor/Name",
"nameAuthor": "Name/Autor",

View File

@@ -122,6 +122,7 @@
"followSystem": "Follow System",
"obtainium": "Obtainium",
"materialYou": "Material You",
"useBlackTheme": "Use pure black dark theme",
"appSortBy": "App Sort By",
"authorName": "Author/Name",
"nameAuthor": "Name/Author",

View File

@@ -122,6 +122,7 @@
"followSystem": "هماهنگ با سیستم",
"obtainium": "Obtainium",
"materialYou": "Material You",
"useBlackTheme": "Use pure black dark theme",
"appSortBy": "مرتب سازی برنامه بر اساس",
"authorName": "سازنده/اسم",
"nameAuthor": "اسم/سازنده",

View File

@@ -122,6 +122,7 @@
"followSystem": "Suivre le système",
"obtainium": "Obtainium",
"materialYou": "Material You",
"useBlackTheme": "Use pure black dark theme",
"appSortBy": "Applications triées par",
"authorName": "Auteur/Nom",
"nameAuthor": "Nom/Auteur",

View File

@@ -122,6 +122,7 @@
"followSystem": "Rendszer szerint",
"obtainium": "Obtainium",
"materialYou": "Material You",
"useBlackTheme": "Use pure black dark theme",
"appSortBy": "App rendezés...",
"authorName": "Szerző/Név",
"nameAuthor": "Név/Szerző",

View File

@@ -122,6 +122,7 @@
"followSystem": "Segui sistema",
"obtainium": "Obtainium",
"materialYou": "Material You",
"useBlackTheme": "Use pure black dark theme",
"appSortBy": "App ordinate per",
"authorName": "Autore/Nome",
"nameAuthor": "Nome/Autore",

View File

@@ -122,6 +122,7 @@
"followSystem": "システムに従う",
"obtainium": "Obtainium",
"materialYou": "Material You",
"useBlackTheme": "Use pure black dark theme",
"appSortBy": "アプリの並び方",
"authorName": "作者名/アプリ名",
"nameAuthor": "アプリ名/作者名",

View File

@@ -123,6 +123,7 @@
"followSystem": "跟随系统",
"obtainium": "Obtainium",
"materialYou": "Material You",
"useBlackTheme": "Use pure black dark theme",
"appSortBy": "排列方式",
"authorName": "作者 / 名字",
"nameAuthor": "名字 / 作者",

View File

@@ -21,7 +21,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart';
// ignore: implementation_imports
import 'package:easy_localization/src/localization.dart';
const String currentVersion = '0.11.30';
const String currentVersion = '0.11.31';
const String currentReleaseTag =
'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES
@@ -263,6 +263,14 @@ class _ObtainiumState extends State<Obtainium> {
darkColorScheme = ColorScheme.fromSeed(
seedColor: defaultThemeColour, brightness: Brightness.dark);
}
// set the background and surface colors to pure black in the amoled theme
if (settingsProvider.useBlackTheme) {
darkColorScheme = darkColorScheme
.copyWith(background: Colors.black, surface: Colors.black)
.harmonized();
}
return MaterialApp(
title: 'Obtainium',
localizationsDelegates: context.localizationDelegates,

View File

@@ -224,6 +224,17 @@ class _SettingsPageState extends State<SettingsPage> {
),
themeDropdown,
height16,
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(tr('useBlackTheme')),
Switch(
value: settingsProvider.useBlackTheme,
onChanged: (value) {
settingsProvider.useBlackTheme = value;
})
],
),
colourDropdown,
height16,
Row(

View File

@@ -64,6 +64,15 @@ class SettingsProvider with ChangeNotifier {
notifyListeners();
}
bool get useBlackTheme {
return prefs?.getBool('useBlackTheme') ?? false;
}
set useBlackTheme(bool useBlackTheme) {
prefs?.setBool('useBlackTheme', useBlackTheme);
notifyListeners();
}
int get updateInterval {
var min = prefs?.getInt('updateInterval') ?? 360;
if (!updateIntervals.contains(min)) {

View File

@@ -181,10 +181,10 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: dd328189f2f4ccea042bb5b382d5e981691cc74b5a3429b9317bff2b19704489
sha256: dcde5ad1a0cebcf3715ea3f24d0db1888bf77027a26c77d7779e8ef63b8ade62
url: "https://pub.dev"
source: hosted
version: "5.2.8"
version: "5.2.9"
flutter:
dependency: "direct main"
description: flutter
@@ -561,10 +561,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: "8304d8a1f7d21a429f91dee552792249362b68a331ac5c3c1caf370f658873f6"
sha256: "1bc5d734b109c327b922b0891b41fc51483ccbd53c0d19952b7e230349a5d90b"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
shared_preferences_foundation:
dependency: transitive
description:
@@ -790,10 +790,10 @@ packages:
dependency: transitive
description:
name: webview_flutter_android
sha256: "5906c9aa8c88ed372b2ad3c88c942790b4fb16f73fdd1c0647b4d747d9cf5b3f"
sha256: bdd3ddbeaf341c75620e153d22b6f4f6c4a342fe4439ed3a10db74dd82e65d1c
url: "https://pub.dev"
source: hosted
version: "3.4.5"
version: "3.5.1"
webview_flutter_platform_interface:
dependency: transitive
description:
@@ -806,10 +806,10 @@ packages:
dependency: transitive
description:
name: webview_flutter_wkwebview
sha256: "9a78d963cce191dd6a9df547301fc5c008bf3dae95a323ec281fff1284e0a037"
sha256: "2ef3f65fd49061c18e4d837a411308f2850417f2d0a7c11aad2c3857bee12c18"
url: "https://pub.dev"
source: hosted
version: "3.2.4"
version: "3.3.0"
win32:
dependency: transitive
description:

View File

@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 0.11.30+152 # When changing this, update the tag in main() accordingly
version: 0.11.31+153 # When changing this, update the tag in main() accordingly
environment:
sdk: '>=2.18.2 <3.0.0'