state_button/state_button
library
Classes
-
StateButton
-
- Build ElevatedButton with decoration change follow state
- onTap the function run when press the button
- initial is default child widget, in undefine state
- fail, success, loader will show
in ButtonState.fail, ButtonState.success and ButtonState.progressing
- style use StateButton.styleFrom for custom style, null with be use theme style or default
- icon is default if use ElevatedButton.icon
- failIcon, successIcon, loaderIcon will be replace the icon field in
the corresponding state ButtonState.fail, ButtonState.success and ButtonState.progressing
- states != null with be apply this state, else with be apply with setCustomState function in key
- for define key:
final GlobalKey<CustomStateMixin<StateButton, ButtonState>> stateButtonKey = GlobalKey();