widget_toolkit library

Classes

AddressModel
ButtonColorStyle
Config class used for setting up colors of the different states of the buttons
ChangeLanguageWidget
CountryCityAddressStrings
countrySearchPickerTitle is the text at the top of the country search picker page
CountryModel
DynamicIcon
EditAddressConfiguration
EditAddressLocalizedStrings
Use this class to translate all labels used in the package. If skip it, default values in English will be used. See the default values in the comments above each method
EditAddressService<T>
The class provides API for saving the address, editing the values of the address: city name and street name,fetching and filtering the countries list for the address. Some methods does not have implementation and implementation for them should be provided in your project, while some of the methods provide default implementation, which if you want you can override with yours.
EditAddressTheme
EditAddressWidget<T extends PickerItemModel>
translateError provide a function which maps the city and street validation errors from the service service to the appropriate RxFieldException
EditFieldWidget
ErrorCardWidget
ErrorCardWidget is an error widget presenting an error as a widget. It provides an option to display a retry button in case the user wants to repeat an operation.
GradientFillButton
Button widget which can be used as a regular button or one with a gradient.
IconTextButton
ItemPickerConfiguration
Item Picker Configuration holder
ItemPickerModalConfiguration
ItemPickerService<T extends PickerItemModel>
ItemPickerTheme
L10nErrorKeyProvider
LanguageModel
This class should be used to create objects for the languages that your app is going to use.
LanguagePickerBloc
The LanguagePickerBloc handles the logic providing a state for the fetched list of languages from the LanguageService. It has a state for the currently selected language currentLanguage and an event setCurrent to update this state.
LanguagePickerBlocEvents
A contract class containing all events of the LanguagePickerBloC.
LanguagePickerBlocStates
A contract class containing all states of the LanguagePickerBloC.
LanguagePickerDependencies
LanguagePickerModalConfiguration
LanguagePickerTheme
LanguageService
This class should be extended in you project and each of its method should have an implementation. It is added as a dependency in the LanguagePickerBloc. In your implementation you can add in the constructor of the class a data source as a dependency from which to get the list of languages used in your app and send requests to update the currently selected language for the user.
MessagePanelError<BlocType extends RxBlocTypeBase>
MessagePanelWidget
ModalConfiguration
App Modal sheet configuration used for controlling different parts and options of a modal sheet, such as height factor, header pill or the close button.
OpenUriBloc
A OpenUri RxBloc which contains logic required to make the OpenUrlWidget work. Defines contracts which allow its user to open links and listen to any changes.
OpenUriBlocEvents
A contract class containing all events of the OpenUriBloC.
OpenUriBlocStates
A contract class containing all states of the OpenUriBloC.
OpenUriRepository
OpenUriRepository contract which defines the methods of the underlying Open Uri logic used in conjunction with the OpenUriBloc.
OpenUrlDependencies
Open URL dependencies that the OpenUrlWidget widget requires in order to perform properly. Includes the bloc containing the states and events to which the OpenUrlWidget can react to or manipulate.
OpenUrlWidget
OpenUrlWidget is a simple wrapper widget which reacts to user input and tries to open the provided url.
OutlineFillButton
PickerItemModel
SearchCountryCustomBuilders<T>
SearchPickerModalConfiguration
SearchPickerPage<T extends PickerItemModel>
SearchPickerService<T>
SearchPickerTheme
SelectedLanguageModel
SelectLanguageItem
The class is used to display the languageModel in the list of languages
ShimmerText
Wrapper widget on top of the Text widget that will display a shimmer effect whenever the provided text is null. If the provided text is not null, it will be rendered properly. It can be useful if we want to occupy a part of the screen and replace it with the text that will be retrieved sometime in the future.
ShimmerType
Abstraction defining type of the shimmer animation.
ShimmerTypeFixed
Shimmer type configuration that automatically generates the placeholder text with a given length.
ShimmerTypeProportional
Shimmer type configuration that is used for defining a proportional shimmer with user defined leading and trailing flex.
ShimmerTypeRandom
Shimmer type configuration with randomly generated leading and trailing flex that falls within a user predefined range.
ShimmerWrapper
The AppShimmer is a versatile widget that provides control over when you want to display the shimmer effect on top of your child widget.
SizedLoadingIndicator
SmallButton
SvgFile
asset_classes option lets you define completely custom classes for handling assets based on their extension Here we used SvgFile to automatically convert svg assets into widgets
TextFieldDialog<T>
A widget which shows a text dialog. label is the value of the text label of the widget, which when pressed loads the text field dialog
TextFieldDialogTheme
TextFieldModalConfiguration
TextFieldValidator<T>
A service validator class, used as a contract for validation methods on a text field dialog. It should be extended, with your custom implementation of its methods.
WidgetToolkitDesignSystem
WidgetToolkitTheme

Functions

showBlurredBottomSheet<T>({required BuildContext context, required WidgetBuilder builder, ModalConfiguration configuration = const ModalConfiguration(), WidgetBuilder? headerBuilder, VoidCallback? onCancelPressed}) Future<T?>
Displays a customizable modal sheet with a background blur effect. Requires a builder method which returns the contents of the modal sheet.
showChangeLanguageBottomSheet({required BuildContext context, required LanguageService service, required dynamic onChanged(LanguageModel language), required String translate(LanguageModel), Widget headerBuilder(BuildContext)?, Widget errorBuilder(ErrorModel?)?, Widget itemBuilder(SelectedLanguageModel model, bool loading, BuildContext context)?, LanguagePickerModalConfiguration modalConfiguration = const LanguagePickerModalConfiguration(), MessagePanelState messageState = MessagePanelState.important}) → void
Display a bottom modal sheet, designed to display a list of available languages, from which to choose one to be set as the language Locale() to your MaterialApp()
showEditAddressBottomSheet<T extends PickerItemModel>(BuildContext context, {required String buttonText, required String headerText, required AddressModel addressModel, required dynamic translateError(Object error), required EditAddressService<T> editAddressService, dynamic onChanged(AddressModel? addressModel)?, EditAddressConfiguration modalConfiguration = const EditAddressConfiguration(), EditAddressLocalizedStrings? editAddressLocalizedStrings, Widget editContactAddressErrorBuilder(ErrorModel?)?, SearchCountryCustomBuilders<T>? searchCountryCustomBuilders, TextFieldModalConfiguration textFieldsModalConfiguration = const TextFieldModalConfiguration(), SearchPickerModalConfiguration countryPickerModalConfiguration = const SearchPickerModalConfiguration()}) Future<AddressModel?>
showErrorBlurredBottomSheet<T>({required BuildContext context, required String error, Widget? headerWidget, Widget? footerWidget, Widget? image, dynamic retryCallback(BuildContext)?, dynamic onCancelCallback()?, ModalConfiguration configuration = const ModalConfiguration(showCloseButton: false), String retryButtonText = 'Retry', ButtonStateModel? retryButtonState}) Future<T?>
Displays a customizable modal sheet with a background blur effect. Requires an error which will be presented on the modal sheet, with an optional retry functionality.
showItemPickerBottomSheet<T extends PickerItemModel>({required BuildContext context, required ItemPickerService<T> service, List<T>? selectedItems, dynamic callback(List<T>)?, ItemPickerItemBuilder<T>? itemBuilder, Widget errorBuilder(Exception)?, Widget emptyBuilder()?, Widget separatorBuilder(BuildContext context, int index)?, String? title, WidgetBuilder? footerBuilder, ItemPickerConfiguration configuration = const ItemPickerConfiguration(), ItemPickerModalConfiguration modalConfiguration = const ItemPickerModalConfiguration(), String? saveButtonText}) → void
Display an bottom sheet with list content where the user can pick single or multiple items
showSearchPickerBottomSheet<T extends PickerItemModel>({required BuildContext context, required String title, required String hintText, required String retryText, required dynamic onItemTap(T?), required SearchPickerService<T> service, ItemPickerItemBuilder<T>? itemBuilder, Widget errorBuilder(Exception)?, Widget emptyBuilder()?, Widget separatorBuilder(int index)?, T? selectedItem, bool showEmptyWidgetWhenNoResultsAreFound = true, double loadingItemHeight = 60, SearchPickerModalConfiguration modalConfiguration = const SearchPickerModalConfiguration()}) → void
Displays search field and a list inside modal bottom sheet with a background blur effect.

Typedefs

ErrorStateCallback<BlocType extends RxBlocTypeBase> = Stream<ErrorModel?> Function(BlocType bloc)
FilledWidgetBuilder<T> = Widget Function(T value, EditFieldState fieldState, Function showDialogCallback)

Exceptions / Errors

EditAddressErrorModel<T>
EmptyListErrorModel
ErrorAccessDeniedModel
Exception thrown whenever some part of the application or package requires access to a resource or a part of the code where it has none.
ErrorModel
The base error model from which all other errors inherit.
GenericErrorModel
UnknownErrorModel