async_button_core library

Classes

AsyncButton
A builder that wraps a button providing disabled, loading, success and error states while retaining almost full access to the original Button's API. This is useful for any long running operations and helps better improve UX.
ButtonState
This union class represents the state of the button in either a Idling, Loading, Success or Error state. This can be considered a enum with extra utilities for ease of use.
Error
Idle
Loading
Success

Typedefs

AsyncButtonBuilderCallback = Widget Function(BuildContext context, Widget child, AsyncCallback? callback, ButtonState buttonState)