🧹 Refactor repetitive builder logic in Material button wrappers - #14
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…ppers Co-authored-by: esenmx <43244505+esenmx@users.noreply.github.com>
Rename buildButton/buildIconButton to _buildButton/_buildIconButton, drop @Protected and the unused BuildContext parameter. All four concrete buttons are parts of the same library, so private members remain overridable and the public API stays byte-identical. Seal AsyncStandardMaterialButton: with private hooks an external subclass that omitted build would compile but fail at first build with NoSuchMethodError; sealing makes that a compile-time error. Docs updated to point custom buttons at AsyncButton. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5309127 to
007e1ed
Compare
🎯 What: Consolidated repetitive
AsyncButtonbuilder logic and long-press gating inAsyncStandardMaterialButton, delegating specific Material widget creation tobuildButtonandbuildIconButtonin subclasses.💡 Why: Reduces duplicate boilerplate across
ElevatedAsyncButton,FilledAsyncButton,OutlinedAsyncButton, andTextAsyncButton, improving maintainability and code readability.✅ Verification: Verified via
flutter analyzeandflutter test. All tests passed with zero linting/analysis errors.✨ Result: Clean abstract builder pattern in
AsyncStandardMaterialButtonwithout changing any runtime behavior.PR created automatically by Jules for task 1611094446663172648 started by @esenmx