diff --git a/.github/workflows/feedback.yml b/.github/workflows/feedback.yml index e5063302..da42a61c 100644 --- a/.github/workflows/feedback.yml +++ b/.github/workflows/feedback.yml @@ -29,7 +29,7 @@ jobs: with: channel: 'stable' - run: flutter pub get - - run: flutter format -n --set-exit-if-changed . + - run: dart format --set-exit-if-changed . - run: flutter analyze - run: flutter test --coverage - uses: codecov/codecov-action@v3.1.4 diff --git a/.github/workflows/gitlab.yml b/.github/workflows/gitlab.yml index 03a58118..885040e6 100644 --- a/.github/workflows/gitlab.yml +++ b/.github/workflows/gitlab.yml @@ -28,6 +28,6 @@ jobs: with: channel: 'stable' - run: flutter pub get - - run: flutter format -n --set-exit-if-changed . + - run: dart format --set-exit-if-changed . - run: flutter analyze - run: flutter test \ No newline at end of file diff --git a/.github/workflows/sentry.yml b/.github/workflows/sentry.yml index b05358a8..b6818f48 100644 --- a/.github/workflows/sentry.yml +++ b/.github/workflows/sentry.yml @@ -28,6 +28,6 @@ jobs: with: channel: 'stable' - run: flutter pub get - - run: flutter format -n --set-exit-if-changed . + - run: dart format --set-exit-if-changed . - run: flutter analyze - run: flutter test \ No newline at end of file diff --git a/feedback/CHANGELOG.md b/feedback/CHANGELOG.md index bebb0b88..74058e4b 100644 --- a/feedback/CHANGELOG.md +++ b/feedback/CHANGELOG.md @@ -1,3 +1,8 @@ +## [3.0.0] + +* Require Flutter 3.10.0 +* Require Dart 3.0.0 + ## [2.6.0] * Require Flutter 3.0.0 diff --git a/feedback/example/analysis_options.yaml b/feedback/example/analysis_options.yaml index 246ba077..d0baf8f8 100644 --- a/feedback/example/analysis_options.yaml +++ b/feedback/example/analysis_options.yaml @@ -1,11 +1,10 @@ include: package:flutter_lints/flutter.yaml analyzer: - strong-mode: - implicit-casts: false - implicit-dynamic: false language: - strict-raw-types: false + strict-raw-types: true + strict-inference: true + strict-casts: true errors: missing_required_param: error missing_return: error diff --git a/feedback/example/pubspec.yaml b/feedback/example/pubspec.yaml index 85cbae18..dc4b4122 100644 --- a/feedback/example/pubspec.yaml +++ b/feedback/example/pubspec.yaml @@ -6,8 +6,8 @@ publish_to: none version: 1.0.0+1 environment: - sdk: '>=2.12.0 <3.0.0' - flutter: '>=2.0.0' + sdk: '>=3.0.0 <4.0.0' + flutter: '>=3.10.0' dependencies: cupertino_icons: ^1.0.3 @@ -15,14 +15,14 @@ dependencies: path: ../../feedback flutter: sdk: flutter - flutter_email_sender: ^5.1.0 + flutter_email_sender: ^6.0.2 flutter_localizations: sdk: flutter - flutter_markdown: ^0.6.2 - http: ^0.13.0 - path_provider: ^2.0.10 - share_plus: ^6.0.0 - url_launcher: ^6.1.2 + flutter_markdown: ^0.6.17 + http: ^1.0.0 + path_provider: ^2.1.1 + share_plus: ^7.1.0 + url_launcher: ^6.1.14 dev_dependencies: flutter_lints: ^2.0.0 diff --git a/feedback/lib/src/l18n/localization.dart b/feedback/lib/src/l18n/localization.dart index 6476f832..7644c46a 100644 --- a/feedback/lib/src/l18n/localization.dart +++ b/feedback/lib/src/l18n/localization.dart @@ -33,11 +33,10 @@ class FeedbackLocalization extends StatelessWidget { return Localizations( delegates: mergedDelegates, - locale: localeOverride ?? _defaultLocale, + locale: localeOverride ?? + View.maybeOf(context)?.platformDispatcher.locale ?? + const Locale('en'), child: child, ); } } - -Locale get _defaultLocale => - WidgetsFlutterBinding.ensureInitialized().window.locale; diff --git a/feedback/lib/src/utilities/media_query_from_window.dart b/feedback/lib/src/utilities/media_query_from_window.dart index b91d6dfc..ddef8419 100644 --- a/feedback/lib/src/utilities/media_query_from_window.dart +++ b/feedback/lib/src/utilities/media_query_from_window.dart @@ -67,7 +67,7 @@ class _MediaQueryFromWindowsState extends State @override Widget build(BuildContext context) { return MediaQuery( - data: MediaQueryData.fromWindow(_binding!.window), + data: MediaQueryData.fromView(View.of(context)), child: widget.child, ); } diff --git a/feedback/pubspec.yaml b/feedback/pubspec.yaml index 7a35894f..eeec6563 100644 --- a/feedback/pubspec.yaml +++ b/feedback/pubspec.yaml @@ -1,13 +1,13 @@ name: feedback description: A Flutter package for getting better feedback. It allows the user to give interactive feedback directly in the app. -version: 2.6.0 +version: 3.0.0 homepage: https://uekoetter.dev/ repository: https://github.com/ueman/feedback issue_tracker: https://github.com/ueman/feedback/issues environment: - sdk: '>=2.12.0 <3.0.0' - flutter: '>=3.0.0' + sdk: '>=3.0.0 <4.0.0' + flutter: '>=3.10.0' dependencies: flutter: diff --git a/feedback/test/golden_images/closed_feedback.png b/feedback/test/golden_images/closed_feedback.png index be85ca9e..1baa143a 100644 Binary files a/feedback/test/golden_images/closed_feedback.png and b/feedback/test/golden_images/closed_feedback.png differ diff --git a/feedback/test/golden_images/open_feedback.png b/feedback/test/golden_images/open_feedback.png index 0b757c07..ad491532 100644 Binary files a/feedback/test/golden_images/open_feedback.png and b/feedback/test/golden_images/open_feedback.png differ