Skip to content

Commit

Permalink
improve condition in preference_screen
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaaElattar committed Oct 3, 2024
1 parent a14b805 commit 9952803
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions app/lib/screens/preference_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ class _PreferenceScreenState extends State<PreferenceScreen> {
@override
Widget build(BuildContext context) {
final themeProvider = Provider.of<ThemeProvider>(context);
bool isSystemDarkMode = false;
bool isDarkMode;
if (themeProvider.themeMode == ThemeMode.system){
var brightness =
final brightness =
SchedulerBinding.instance.platformDispatcher.platformBrightness;
isSystemDarkMode = brightness == Brightness.dark;
isDarkMode = brightness == Brightness.dark;
} else {
isDarkMode = themeProvider.themeMode == ThemeMode.dark;
}
bool isDarkMode = themeProvider.themeMode == ThemeMode.dark ||
(themeProvider.themeMode == ThemeMode.system && isSystemDarkMode);
return LayoutDrawer(
titleText: 'Settings',
content: ListView(
Expand Down
12 changes: 6 additions & 6 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,8 @@ packages:
dependency: "direct main"
description:
path: "packages/gridproxy_client"
ref: tfchain_graphql_hotfix
resolved-ref: "314f46728e43cb86f430cda6ba756d4be3fb6e07"
ref: tfchain_graphql
resolved-ref: "34c29c3d39530dae2843fbe3ad47307db6d28a23"
url: "https://github.com/codescalers/tfgrid-sdk-dart"
source: git
version: "1.0.0"
Expand Down Expand Up @@ -1244,8 +1244,8 @@ packages:
dependency: "direct main"
description:
path: "packages/stellar_client"
ref: tfchain_graphql_hotfix_2
resolved-ref: "563cc0297d79dc333157fe69a7540f0190ff3496"
ref: tfchain_graphql
resolved-ref: "34c29c3d39530dae2843fbe3ad47307db6d28a23"
url: "https://github.com/codescalers/tfgrid-sdk-dart"
source: git
version: "0.1.0"
Expand Down Expand Up @@ -1333,8 +1333,8 @@ packages:
dependency: "direct main"
description:
path: "packages/tfchain_client"
ref: tfchain_graphql_hotfix
resolved-ref: "314f46728e43cb86f430cda6ba756d4be3fb6e07"
ref: tfchain_graphql
resolved-ref: "34c29c3d39530dae2843fbe3ad47307db6d28a23"
url: "https://github.com/codescalers/tfgrid-sdk-dart"
source: git
version: "0.1.0"
Expand Down
6 changes: 3 additions & 3 deletions app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ dependencies:
tfchain_client:
git:
url: https://github.com/codescalers/tfgrid-sdk-dart
ref: tfchain_graphql_hotfix
ref: tfchain_graphql
path: packages/tfchain_client
stellar_client:
git:
url: https://github.com/codescalers/tfgrid-sdk-dart
ref: tfchain_graphql_hotfix_2
ref: tfchain_graphql
path: packages/stellar_client
gridproxy_client:
git:
url: https://github.com/codescalers/tfgrid-sdk-dart
ref: tfchain_graphql_hotfix
ref: tfchain_graphql
path: packages/gridproxy_client
shuftipro_onsite_sdk: ^1.0.5
flutter_svg: ^2.0.6
Expand Down

0 comments on commit 9952803

Please sign in to comment.