Skip to content

Commit

Permalink
chore: remove deprecated use of MediaQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
pr-Mais committed Aug 8, 2024
1 parent e1487b5 commit 9b34117
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/models/theme.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:noor/exports/constants.dart' show Images;
import 'package:noor/exports/services.dart' show SharedPrefsService;
Expand All @@ -8,9 +9,7 @@ class ThemeModel with ChangeNotifier {
String _userTheme = SharedPrefsService.getString('theme');

String get userTheme => _userTheme;
Brightness get brightness =>
MediaQueryData.fromView(WidgetsBinding.instance.window)
.platformBrightness;
Brightness get brightness => PlatformDispatcher.instance.platformBrightness;

set userTheme(String value) {
_userTheme = value;
Expand Down
1 change: 0 additions & 1 deletion lib/pages/tabs/page_3_counter/counter_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:noor/exports/controllers.dart';
import 'package:noor/exports/pages.dart';
import 'package:noor/pages/tabs/page_3_counter/counter_view_model.dart';
import 'package:noor/utils/build_context.dart';
import 'package:noor/utils/to_arabic.dart';
import 'package:provider/provider.dart';

const kMaxLength = 75;
Expand Down

0 comments on commit 9b34117

Please sign in to comment.