Repository navigation
Update Min Flutter SDK - #16
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the package for newer Dart/Flutter toolchains by raising SDK constraints and refactoring widget constructors to use super.key / super.viewModel, plus a small test cleanup.
Changes:
- Bump minimum SDK constraints (Dart
>=3.0.0, Flutter>=3.38.0) and updateflutter_lintsto^6.0.0. - Modernize constructors across library and tests to use
super.keyandrequired super.viewModel. - Simplify a test widget by removing unnecessary
.toList()calls when spreading iterables.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/current_widget_test.dart | Refactors test widget constructors to super.viewModel (but drops Key params). |
| test/current_property_tests/string_property_test.dart | Updates test widget constructor to super.key / super.viewModel. |
| test/current_property_tests/map_property_test.dart | Updates constructor + removes .toList() in spread children. |
| test/current_property_tests/list_property_test.dart | Updates test widget constructor to super.key / super.viewModel. |
| test/current_property_tests/int_property_test.dart | Updates test widget constructor to super.key / super.viewModel. |
| test/current_property_tests/double_property_test.dart | Updates test widget constructor to super.key / super.viewModel. |
| test/current_property_tests/current_property_test.dart | Refactors constructor to super.viewModel (but drops Key param). |
| test/current_property_tests/bool_property_test.dart | Updates test widget constructor to super.key / super.viewModel. |
| pubspec.yaml | Raises Dart/Flutter minimums and upgrades flutter_lints. |
| lib/src/current_widget.dart | Modernizes base widget constructor to accept super.key. |
| lib/src/current.dart | Modernizes constructors (super.key, required super.child). |
| lib/current.dart | Changes library directive (currently to library;). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the Flutter state management library to modernize its codebase, improve consistency, and ensure compatibility with recent Flutter and Dart versions. The most significant changes are grouped below:
Flutter and Dart Version Updates:
>=3.0.0and the Flutter SDK to>=3.38.0inpubspec.yaml, ensuring compatibility with the latest stable releases.flutter_lintsdev dependency from version^2.0.0to^6.0.0for improved linting and code quality checks.Constructor Modernization and Code Consistency:
super.keyandrequired super.viewModelsyntax, replacing the olderKey? keyand explicit forwarding, resulting in more concise and idiomatic Dart code. This change affects files such aslib/src/current.dart,lib/src/current_widget.dart, and several test files. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Minor Code Cleanups:
.toList()calls in theMapTestWidgettest, simplifying widget construction and improving code clarity.lib/current.dartfor Dart 3 compatibility.