loadable_buttons 2.0.0
loadable_buttons: ^2.0.0 copied to clipboard
Provides enhanced buttons with built-in loading states, async functionality and customizable transitions.
2.0.0 #
- Breaking: require Flutter 3.44.0+ and Dart 3.12.0+.
- Breaking: use standalone
material_ui1.0.0+ for all Material widgets and public types. Applications must importpackage:material_ui/material_ui.dartfor themes andButtonStylevalues. - Add
AsyncCupertinoButton,.filled, and.tintedusing standalonecupertino_ui1.0.0+, with native Cupertino loading indicators and shared loading, error, transition, and accessibility behavior. - Add design-specific
material.dartandcupertino.dartentry points while preserving the combinedloadable_buttons.dartimport. - Add optional
onErrorand theAsyncButtonErrorHandlertypedef to handle activation failures. Successful handlers consume errors; omitted handlers preserve propagation. Async handlers keep the button loading until completion, and handler failures propagate. - Add optional localized
loadingSemanticsLabelto every button constructor. Labels apply to default spinners; custom loading content owns its semantics. - Add nullable Material style shortcuts for padding, minimum size, alignment, enabled/disabled colors, and mouse cursors to Elevated, Filled, Outlined, and Text buttons, including icon and tonal variants. Shortcuts fall back through the supplied style, family theme, and native defaults per property and state.
- Honor inherited
FloatingActionButtonThemepadding and icon spacing for extended FAB stack transitions, matching the native standalone button. - Ship a
loadable-buttons-usageconsumer agent skill, installable withdart run skills@ get --package loadable_buttons. - Add a 1.x migration guide with before/after examples.
1.1.1 #
- Invoke Filled button custom builders only for custom transitions.
- Match native Material padding in Elevated, Filled (including tonal), Outlined, and Text icon-and-label buttons, including text scaling and RTL layouts.
- Preserve explicit and inherited theme padding, including state-dependent fallbacks.
- Center stack loading indicators within the whole button, including padding, for Material text buttons and extended floating action buttons. Preserve idle layout and custom loading-content interaction.
1.1.0 #
- Clarify the Dart requirement as >=3.7.0 <4.0.0, matching the existing Flutter 3.29.0 minimum.
- Preserve requested mouse cursors in all icon-button variants.
- Fix extended floating action button padding, icon spacing, and text styling on Flutter 3.29.
- Improve loading transitions with smooth resizing, centered extended FAB indicators, and correct layout when no icon is supplied.
- Prevent inactive loading-transition content from receiving pointer input, focus, or accessibility actions.
- Resolve default loading indicator colors from the button style or theme.
- Document loading ownership, consumer-owned errors, disabled and accessible behavior, custom builder responsibilities, sizing, and text scaling in the README and public API reference.
- Add runnable example controls for independent loading sources, completion and handled errors, disabled and long-press behavior, IconButton selection, and custom loading content and builders.
1.0.1 #
-
Keep external
loadingand pendingonPressedoperations independent in all button families. Clearing external loading no longer unlocks a pending operation or allows duplicate execution. -
Keep public keys on the async wrapper, preventing duplicate
GlobalKeyerrors. Rebuilding the same variant with the same key preserves its state and pending operation. -
Block long presses while Elevated, Filled (including tonal), Outlined, and Text buttons are loading, including callbacks captured before a rebuild. Their loading state also disables keyboard activation and reports disabled semantics; idle long-press-only buttons remain usable.
-
Preserve native Material disabled behavior for null
onPressedcallbacks in IconButton and floating action button variants. -
Forward
onLongPress,onHover,onFocusChange, andfocusNodethrough the Elevated, Filled, Outlined, and Text.iconconstructors when an icon is supplied, matching the null-icon fallback and Filled.tonalIconbehavior. -
Honor
isSelected,selectedIcon, selection styling, and Material 3 selection semantics in everyAsyncIconButtonvariant. Selected icons keep their loading transitions and fall back toiconwhen omitted. -
Update analyzer and lint tooling, and add package, test, and example analysis to CI.
1.0.0 #
- Fixed
loadingChildrendering inAsyncElevatedButtonwhen usingTransitionAnimationType.stack - Ensured loading indicators display correctly across all button variants
- Prevented multiple taps while an async operation is running in
AsyncIconButton - Verified and adjusted loading indicator color and opacity for
AsyncIconButton - Added assertions for
customBuilderandsplashRadiusinAsyncIconButton - Refactored
AsyncOutlinedButtonandAsyncTextButtontests for consistency - Added comprehensive tests for
AsyncFloatingActionButton(various states and transitions) - Docs: Clarified
loadingChildbehavior withTransitionAnimationType.stackin README.
0.2.0 #
- Add support for AsyncIconButton
- Add support for AsyncFloatingActionButton
0.1.0 #
- Add support for AsyncFilledButton and AsyncFilledButton.icon
- Add support for AsyncOutlinedButton and AsyncOutlinedButton.icon
- Add support for AsyncTextButton and AsyncTextButton.icon
- Add support for AsyncIconButton
- Improve Code Quality
0.0.1 #
- Add initial version of the package with AsyncElevatedButton and AsyncElevatedButton.icon implementations
