Skip to content

Commit

Permalink
chore: drop support for dart SDK version below 2.17
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaroslav Kuchmenko committed Oct 25, 2023
1 parent b37c6b5 commit 0877cef
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# See https://www.dartlang.org/guides/libraries/private-files
.fvm/
.DS_Store

# Files and directories created by pub
.dart_tool/
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ version: 1.0.0+1
publish_to: none

environment:
sdk: '>=2.12.0 <4.0.0'
sdk: '>=2.19.0 <4.0.0'

dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.4
device_preview: 1.0.0
cupertino_icons: ^1.0.5
device_preview: ^1.1.0
settings_ui:
path: ../
# settings_ui: ^2.0.2
Expand Down
10 changes: 4 additions & 6 deletions lib/src/list/settings_list.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:settings_ui/src/sections/abstract_settings_section.dart';
Expand Down Expand Up @@ -100,7 +102,7 @@ class _SettingsListState extends State<SettingsList> {
DevicePlatform platform,
BuildContext context,
) {
final mqSizeWidth = MediaQuery.sizeOf(context).width;
final mqSizeWidth = MediaQuery.of(context).size.width;
final isWideScreen = mqSizeWidth > widget.wideScreenBreakpoint;
double horizontalPaddingValue =
(mqSizeWidth - widget.wideScreenBreakpoint) / 2;
Expand Down Expand Up @@ -137,11 +139,7 @@ class _SettingsListState extends State<SettingsList> {
BuildContext context,
DevicePlatform platform,
) {
// final platformBrightness =
// View.of(context).platformDispatcher.platformBrightness;
// TODO: remove this deprecated Window usage whenever min dark SDK constraint is 3.0
final Brightness platformBrightness =
WidgetsBinding.instance.window.platformBrightness;
final platformBrightness = PlatformDispatcher.instance.platformBrightness;
final materialBrightness = Theme.of(context).brightness;
final cupertinoBrightness = CupertinoTheme.of(context).brightness;

Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2.0.3
homepage: https://github.com/yako-dev/flutter-settings-ui

environment:
sdk: '>=2.12.0 <4.0.0'
sdk: '>=2.17.0 <4.0.0'

dependencies:
flutter:
Expand All @@ -13,6 +13,6 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^3.0.0
flutter_lints: ^2.0.1

flutter:

0 comments on commit 0877cef

Please sign in to comment.