Skip to content

🧹 Refactor repetitive builder logic in Material button wrappers - #14

Merged
esenmx merged 2 commits into
mainfrom
refactor-async-material-button-builder-1611094446663172648
Aug 23, 2026
Merged

🧹 Refactor repetitive builder logic in Material button wrappers#14
esenmx merged 2 commits into
mainfrom
refactor-async-material-button-builder-1611094446663172648

Conversation

@esenmx

@esenmx esenmx commented Aug 22, 2026

Copy link
Copy Markdown
Owner

🎯 What: Consolidated repetitive AsyncButton builder logic and long-press gating in AsyncStandardMaterialButton, delegating specific Material widget creation to buildButton and buildIconButton in subclasses.
💡 Why: Reduces duplicate boilerplate across ElevatedAsyncButton, FilledAsyncButton, OutlinedAsyncButton, and TextAsyncButton, improving maintainability and code readability.
✅ Verification: Verified via flutter analyze and flutter test. All tests passed with zero linting/analysis errors.
✨ Result: Clean abstract builder pattern in AsyncStandardMaterialButton without changing any runtime behavior.


PR created automatically by Jules for task 1611094446663172648 started by @esenmx

@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits August 23, 2026 19:11
…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>
@esenmx
esenmx force-pushed the refactor-async-material-button-builder-1611094446663172648 branch from 5309127 to 007e1ed Compare August 23, 2026 16:12
@esenmx
esenmx merged commit 4b33036 into main Aug 23, 2026
6 checks passed
@esenmx
esenmx deleted the refactor-async-material-button-builder-1611094446663172648 branch August 23, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant