flutter_waff library

Classes

ActionSheetItem<T>
AppLifecycleEvent
AppLifecycleListener
AppLifecycle Listener
ConnectivityEvent
ConnectivityListener
Listen network status and broadcast ConnectivityEvent event via eventBus.
Dio
A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, File downloading etc. and Dio is very easy to use.
EventBus
Dispatches events to listeners using the Dart Stream API. The EventBus enables decoupled applications. It allows objects to interact without requiring to explicitly define listeners and keeping track of them.
Http
Http library, secondary packaging based on "dio/dio".
HttpBaseOptions
HttpCancelToken
Cancle token
HttpClassicTransformer
Classic response transformer
HttpErrorCode
HttpRunnerParams
HttpStandardTransformer
Standard response transformer
HttpTransformer
LocaleManage
LocaleManageSetting
Log
Logger tools, secondary packaging based on "logger/logger".
ThemeManage<C extends ThemeManageColors>
ThemeManageColors
Waff
WaffLocalizations
Waff language pack
WaffLocalizationsDelegate

Properties

eventBus EventBus
no setter
getxContext Future<BuildContext>
Get app context
no setter

Functions

breakWord(String word) String
Fixed TextOverflow.ellipsis
buildEntityList<T>(Iterable data, BuildEntityListCallback<T> callback, {bool growable = false}) List<T>
Build entity list
buildHttpRunner<T>(HttpRunnerAction<T> action) HttpRunner<T>
Create API functions with perfect error handling.
calculateGridAspectRatio(double gridWidth, double crossAxisSpacing, int crossAxisCount, double itemHeight) double
Calculate grid aspect ratio
calculateGridItemSize(double gridWidth, double crossAxisSpacing, int crossAxisCount, double scale) Size
Calculate grid item size
calculateHeightByScale(double width, double scale) double
Calculate height by scale
enumFromString<T>(Iterable<T> values, String value) → T
Enum from string
enumToString(dynamic obj) String
Enum to string
findLocaleName(Iterable<String> supportedLocaleNames, String localeName) String?
If there are items related to Platform.localeName in supportedLocaleNames, return this item, otherwise return null.
isEmptyOrNullString(String? text) bool
Whether the string is empty or null
showActionsSheet<T>(List<ActionSheetItem<T>> actions, {bool disabledCancel = false, String? cancelText, TextStyle? cancelStyle}) Future<T?>
Actions sheet pops up from the bottom of the screen
showAlertDialog(String content, {String? title, String? ok}) Future<void>
Show a alert-dialog
showConfirmDialog(String content, {String? title, String? yes, String? no}) Future<bool>
Show a alert-dialog
showSnackBar(String content, {String? title, int durationSeconds = 3, Color? backgroundColor, bool closePrevious = false}) → void
Show snack bar
showSnackBarError(String content, {String? title, int durationSeconds = 6, bool closePrevious = false}) → void
Show error snack bar

Typedefs

BuildEntityListCallback<T> = T Function(Map<String, dynamic> element)
GetLocaleName = String? Function()
GetThemeMode = int? Function()
HttpParams = Map<String, dynamic>
HttpRunner<T> = Future<T?> Function(HttpRunnerParams params)
HttpRunnerAction<T> = Future<T> Function(HttpRunnerParams params)
LocaleDefine = Map<String, String>
SetLocaleName = void Function(String localeName)
SetThemeMode = void Function(int themeMode)
TranslationKey = Map<String, String>
TranslationKeys = Map<String, TranslationKey>

Exceptions / Errors

HttpError