Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request extracts inline code snippets from the documentation of Slider, SliderTheme, and SliderThemeData into separate snippet files under the example directory, referencing them via {@example} tags, and adds corresponding widget tests. The review feedback suggests making the State classes (LaunchState and BlissfulState) private in the newly added slider theme snippet files to align with Flutter conventions.
| class Launch extends StatefulWidget { | ||
| const Launch({super.key}); | ||
|
|
||
| @override | ||
| State<Launch> createState() => LaunchState(); | ||
| } | ||
|
|
||
| class LaunchState extends State<Launch> { |
There was a problem hiding this comment.
In Flutter, State classes should be private to prevent exposing internal state representation and polluting the public API namespace. Consider renaming LaunchState to _LaunchState.
| class Launch extends StatefulWidget { | |
| const Launch({super.key}); | |
| @override | |
| State<Launch> createState() => LaunchState(); | |
| } | |
| class LaunchState extends State<Launch> { | |
| class Launch extends StatefulWidget { | |
| const Launch({super.key}); | |
| @override | |
| State<Launch> createState() => _LaunchState(); | |
| } | |
| class _LaunchState extends State<Launch> { |
| class Blissful extends StatefulWidget { | ||
| const Blissful({super.key}); | ||
|
|
||
| @override | ||
| State<Blissful> createState() => BlissfulState(); | ||
| } | ||
|
|
||
| class BlissfulState extends State<Blissful> { |
There was a problem hiding this comment.
In Flutter, State classes should be private to prevent exposing internal state representation and polluting the public API namespace. Consider renaming BlissfulState to _BlissfulState.
| class Blissful extends StatefulWidget { | |
| const Blissful({super.key}); | |
| @override | |
| State<Blissful> createState() => BlissfulState(); | |
| } | |
| class BlissfulState extends State<Blissful> { | |
| class Blissful extends StatefulWidget { | |
| const Blissful({super.key}); | |
| @override | |
| State<Blissful> createState() => _BlissfulState(); | |
| } | |
| class _BlissfulState extends State<Blissful> { |
This PR addresses batch 13 of the migration detailed in flutter/flutter#188530 (comment).
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2