utils_widget library

Classes

AnimatedButton
AnimatedIconButton
similar a AnimatedButton but has an icon instead of textButton
AnimatedNumericText
AnimatedPasswordTextFormField
AnimatedText
https://medium.com/flutter-community/flutter-challenge-3d-bottom-navigation-bar-48952a5fd996
AnimatedTextFormField
BottomCard
BottomDeleteCard
BottomSlideNotification
a notification show in front of screen and shown at the bottom
CircleButton
Create a circle button with an icon.
CustomAnimationToast
Example to show how to popup overlay with custom animation.
CustomCard
CustomContainer
CustomDividerText
CustomInputDecoration
CustomItemCard
CustomListTile
CustomNetworkImage
DartHelper
EmptyWidget
FadeIn
HexColor
IosStyleToast
LaunchUtils
ListTileAmazon
MathHelper
Matrix
ModalKey<T>
showOverlay with block other show with the same ModalKey.
OverlayNotification
OverlayNotificationEntry
OverlayNotificationTheme
Responsive
ResponsiveMenuItems
Used to define tap items for the the responsive Scaffold menu.
ResponsiveScaffold
A simplistic animated responsive Scaffold.
Ring
A circle with a hole
RoundButton
SearchWidget
SlideDismissible
Can be dismiss by left or right slide.
StatusUpdateBottomCard
Toast
ToastListOverlay<T>
ToastListOverlayState<T>
ToastThemeData
Theme data for toast.
ToastTimer<T>
TopSlideNotification
A notification show in front of screen and shown at the top.
TransientKey<T>
The OverlayNotificationEntry associated with TransientKey will be dismiss immediately when next OverlayNotificationEntry showing by showOverlay with the same key.

Constants

errorLine → const String
Global notice lines
successLine → const String

Properties

kNotificationDuration Duration
The length of time the notification is fully displayed.
getter/setter pair
kNotificationSlideDuration Duration
Notification display or hidden animation duration.
getter/setter pair
logger ↔ Logger
getter/setter pair
loggerLevel ↔ Level
getter/setter pair
textThemeDark TextTheme
getter/setter pair
textThemeLight TextTheme
getter/setter pair

Functions

copyOnClipboard(String text) Future<void>
customDivider({double? height, double? thickness, double? indent = 30, double? endIndent = 30, Color? color}) Widget
customListTile(String leading, String title) Widget
getFileSizeString({required int bytes, int decimals = 0}) String
getWidgetSize(GlobalKey<State<StatefulWidget>> key) Size?
inputDecoration(dynamic context, {required String hintText, required String labelText, int? hintMaxLines, String? prefixText, String? suffixText, IconData prefixIcon = Icons.edit_rounded, bool showPrefixIcon = true, Widget? icon, Widget? suffixIcon}) InputDecoration
settingOptionPattern(IconData icon, String title, void onTap()) Widget
showErrorNotice(String title, String message, {Widget? leading, Color background = Colors.red, NotificationPosition position = NotificationPosition.top, DismissDirection slideDismissDirection = DismissDirection.up, Duration duration = const Duration(seconds: 4), Widget? trailing, EdgeInsetsGeometry? contentPadding, Color? foreground, double elevation = 16, Key? key, bool autoDismiss = true, BuildContext? context, TextStyle titleStyle = const TextStyle(color: Colors.white), TextStyle subtitleStyle = const TextStyle(color: Colors.white), Decoration? decoration, Decoration? foregroundDecoration, double? width, double? height, BoxConstraints? constraints, EdgeInsetsGeometry? margin, Matrix4? transform, AlignmentGeometry? transformAlignment, Clip clipBehavior = Clip.none, MaterialType type = MaterialType.canvas, Color? shadowColor, Color? surfaceTintColor, TextStyle? textStyle, BorderRadiusGeometry? borderRadius, ShapeBorder? shape, bool borderOnForeground = true, Duration animationDuration = kThemeChangeDuration, EdgeInsetsGeometry? padding, Color? color, AlignmentGeometry? alignment}) → void
showInfoNotice(String title, String message, {Widget? leading, Color? background, NotificationPosition position = NotificationPosition.top, DismissDirection slideDismissDirection = DismissDirection.up, Duration duration = const Duration(seconds: 4), Widget? trailing, EdgeInsetsGeometry? contentPadding, Color? foreground, double elevation = 16, Key? key, bool autoDismiss = true, BuildContext? context, TextStyle titleStyle = const TextStyle(color: Colors.white), TextStyle subtitleStyle = const TextStyle(color: Colors.white), Decoration? decoration, Decoration? foregroundDecoration, double? width, double? height, BoxConstraints? constraints, EdgeInsetsGeometry? margin, Matrix4? transform, AlignmentGeometry? transformAlignment, Clip clipBehavior = Clip.none, MaterialType type = MaterialType.canvas, Color? shadowColor, Color? surfaceTintColor, TextStyle? textStyle, BorderRadiusGeometry? borderRadius, ShapeBorder? shape, bool borderOnForeground = true, Duration animationDuration = kThemeChangeDuration, EdgeInsetsGeometry? padding, Color? color, AlignmentGeometry? alignment}) → void
showOverlay(AnimatedOverlayWidgetBuilder builder, {Curve? curve, Duration? duration, Key? key, BuildContext? context, Duration? animationDuration, Duration? reverseAnimationDuration}) OverlayNotificationEntry
Basic api to show overlay widget.
showOverlayNotification(WidgetBuilder builder, {Duration? duration, Key? key, NotificationPosition position = NotificationPosition.top, BuildContext? context}) OverlayNotificationEntry
Popup a notification at the top of screen.
showSimpleNotification(Widget content, {Widget? leading, Widget? subtitle, Widget? trailing, EdgeInsetsGeometry? contentPadding, Color? background, Color? foreground, double elevation = 16, Duration? duration, Key? key, bool autoDismiss = true, bool slideDismiss = false, NotificationPosition position = NotificationPosition.top, BuildContext? context, DismissDirection? slideDismissDirection, AlignmentGeometry? alignment, EdgeInsetsGeometry? padding, Color? color, Decoration? decoration, Decoration? foregroundDecoration, double? width, double? height, BoxConstraints? constraints, EdgeInsetsGeometry? margin, Matrix4? transform, AlignmentGeometry? transformAlignment, Clip clipBehavior = Clip.none, MaterialType type = MaterialType.canvas, Color? shadowColor, Color? surfaceTintColor, TextStyle? textStyle, BorderRadiusGeometry? borderRadius, ShapeBorder? shape, bool borderOnForeground = true, Duration animationDuration = kThemeChangeDuration}) OverlayNotificationEntry
Show a simple notification above the top of window.
showSuccessNotice(String title, String message, {Widget? leading, Color background = Colors.green, NotificationPosition position = NotificationPosition.top, DismissDirection slideDismissDirection = DismissDirection.up, Duration duration = const Duration(seconds: 4), Widget? trailing, EdgeInsetsGeometry? contentPadding, Color? foreground, double elevation = 16, Key? key, bool autoDismiss = true, BuildContext? context, TextStyle titleStyle = const TextStyle(color: Colors.white), TextStyle subtitleStyle = const TextStyle(color: Colors.white), Decoration? decoration, Decoration? foregroundDecoration, double? width, double? height, BoxConstraints? constraints, EdgeInsetsGeometry? margin, Matrix4? transform, AlignmentGeometry? transformAlignment, Clip clipBehavior = Clip.none, MaterialType type = MaterialType.canvas, Color? shadowColor, Color? surfaceTintColor, TextStyle? textStyle, BorderRadiusGeometry? borderRadius, ShapeBorder? shape, bool borderOnForeground = true, Duration animationDuration = kThemeChangeDuration, EdgeInsetsGeometry? padding, Color? color, AlignmentGeometry? alignment}) → void
toast(String message, {Duration duration = Toast.LENGTH_SHORT, BuildContext? context}) → void
Popup a message in front of screen.
validateForm({LoadingButtonController? btnController, required GlobalKey<FormState> formKey}) Future<bool>

Typedefs

AnimatedOverlayWidgetBuilder = Widget Function(BuildContext context, double progress)
To build a widget with animated value. progress : the progress of overlay animation from 0 - 1
ToastListItemBuilder<T> = Widget Function(BuildContext context, T item, int index, Animation<double> animation)