-
-
Notifications
You must be signed in to change notification settings - Fork 189
useExpansibleController #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
29 changes: 19 additions & 10 deletions
29
packages/flutter_hooks/lib/src/expansion_tile_controller.dart
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,37 @@ | ||
| part of 'hooks.dart'; | ||
|
|
||
| /// Creates a [ExpansibleController] that will be disposed automatically. | ||
| /// | ||
| /// See also: | ||
| /// - [ExpansibleController] | ||
| ExpansibleController useExpansibleController({List<Object?>? keys}) { | ||
| return use(_ExpansibleControllerHook(keys: keys)); | ||
| } | ||
|
|
||
| /// Creates a [ExpansionTileController] that will be disposed automatically. | ||
| /// | ||
| /// See also: | ||
| /// - [ExpansionTileController] | ||
| @Deprecated('Use `useExpansibleController` instead.') | ||
| ExpansionTileController useExpansionTileController({List<Object?>? keys}) { | ||
| return use(_ExpansionTileControllerHook(keys: keys)); | ||
| return use(_ExpansibleControllerHook(keys: keys)); | ||
| } | ||
|
|
||
| class _ExpansionTileControllerHook extends Hook<ExpansionTileController> { | ||
| const _ExpansionTileControllerHook({List<Object?>? keys}) : super(keys: keys); | ||
| class _ExpansibleControllerHook extends Hook<ExpansibleController> { | ||
| const _ExpansibleControllerHook({List<Object?>? keys}) : super(keys: keys); | ||
|
|
||
| @override | ||
| HookState<ExpansionTileController, Hook<ExpansionTileController>> | ||
| createState() => _ExpansionTileControllerHookState(); | ||
| HookState<ExpansibleController, Hook<ExpansibleController>> createState() => | ||
| _ExpansibleControllerHookState(); | ||
| } | ||
|
|
||
| class _ExpansionTileControllerHookState | ||
| extends HookState<ExpansionTileController, _ExpansionTileControllerHook> { | ||
| final controller = ExpansionTileController(); | ||
| class _ExpansibleControllerHookState | ||
| extends HookState<ExpansibleController, _ExpansibleControllerHook> { | ||
| final controller = ExpansibleController(); | ||
|
|
||
| @override | ||
| String get debugLabel => 'useExpansionTileController'; | ||
| String get debugLabel => 'useExpansibleController'; | ||
|
|
||
| @override | ||
| ExpansionTileController build(BuildContext context) => controller; | ||
| ExpansibleController build(BuildContext context) => controller; | ||
| } |
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
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify the Flutter SDK version requirement.
The update from
">=3.21.0-13.0.pre.4"to">=3.32.0"represents a significant version jump. Please ensure that Flutter 3.32.0 is a valid, released version and that this requirement aligns with the package's actual dependencies.🌐 Web query:
💡 Result:
As of June 2025, the latest stable version of Flutter is 3.29.0, released on February 12, 2025. (groups.google.com) This release introduced several enhancements, including:
Rendering Engine Update: Flutter now runs Dart code on the platform's main thread for both Android and iOS, improving platform interop through direct synchronous calls. (codewithandrea.com)
Cupertino and Material Widgets Refinements: The update brought refinements to Cupertino and Material widgets, along with DevTools enhancements and Impeller engine optimizations. (codewithandrea.com)
Deprecation of Certain Packages: In an effort to focus on the core framework, the Flutter team announced the discontinuation of support for several official packages, effective April 30, 2025. (codewithandrea.com)
To upgrade to Flutter 3.29.0, you can run the following command in your terminal:
For a comprehensive list of changes and updates in this release, refer to the official Flutter release notes. (docs.flutter.dev)
Citations:
Invalid Flutter SDK Version Constraint
The SDK constraint in
packages/flutter_hooks/pubspec.yamlrequires Flutter>=3.32.0, but Flutter 3.32.0 hasn’t been released. The latest stable version as of June 2025 is 3.29.0.Please update the constraint accordingly:
📝 Committable suggestion
🤖 Prompt for AI Agents