🧹 refactor FloatingActionAsyncButton build method and variants - #12
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. |
…nt builders Co-authored-by: esenmx <43244505+esenmx@users.noreply.github.com>
… via tear-off - Delete _resolvedHeroTag: it returned its input unchanged for every value (const sentinel is canonical, != on Object is identity). Keep the _defaultHeroTag sentinel, which is load-bearing for duplicate-Hero checks. - Inline the variant switch into the AsyncButton builder closure, removing the pass-through _buildButton hop. - Replace byte-identical _buildSmall/_buildLarge with _buildSmallOrLarge, selecting FloatingActionButton.small/.large by constructor tear-off. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Count-only assertion would pass with a swapped .small/.large mapping. Small renders 48x48 under the default padded tap target, large 96x96. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0e0cd39 to
49fd557
Compare
🎯 What: Refactored
FloatingActionAsyncButton.buildinlib/src/buttons/floating_action_async_button.dartto split the monolithicbuildmethod into cleaner helper methods (_buildButton,_buildStandard,_buildSmall,_buildLarge, and_buildExtended) and a_resolvedHeroTaggetter.💡 Why: Reduces the complexity and length of the
buildmethod from over 100 lines down to a concise dispatching method, improving readability, maintainability, and code health while reusing member state without argument repetition.✅ Verification: Verified with
dart format,flutter analyze(0 issues), andflutter test(70/70 passing tests).✨ Result: Enhanced readability and maintainability of
FloatingActionAsyncButtonwithout changing any behavior or API contract.PR created automatically by Jules for task 18428285029922423034 started by @esenmx