MyDialog class
static class to call alert, confirm, toast etc. ** Must use navigatorKey Or call initialize with a context in Navigator **
Constructors
- MyDialog()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
return a globalKey use for Navigator
getter/setter pair
- theme → ShirneDialogTheme
-
get ShirneDialogTheme from context or return default
no setter
Static Methods
-
alert(
dynamic message, {String? buttonText, TextStyle? buttonStyle, bool onConfirm()?, String title = '', Widget? titleWidget, ModalStyle? style, bool? barrierDismissible, Color? barrierColor}) → Future< bool?> - A wrapper of ShirneDialog.alert
-
alertModal<
T> (Widget body, List< Widget> actions, {String title = '', Widget? titleWidget, bool? barrierDismissible, Color? barrierColor, ModalStyle? style}) → Future<T?> - A wrapper of ShirneDialog.alertModal
-
confirm(
dynamic message, {String? buttonText, TextStyle? buttonStyle, FutureOr< bool> onConfirm()?, String title = '', Widget? titleWidget, String? cancelText, TextStyle? cancelStyle, ModalStyle? style, bool? barrierDismissible, Color? barrierColor}) → Future<bool?> - A wrapper of ShirneDialog.confirm
-
dropdown(
List< Widget> actions, {required Rect origRect, CrossAxisAlignment? actionAlignment, HitTestBehavior? backdropBehavior, Color? backdropColor, EdgeInsets? padding, Set<DropDownLayoutPosition> ? position, AnimationConfig? animate, AnimationConfig? leaveAnimate}) → EntryController -
getAlignment(
String align) → Alignment - transform a String to Alignment that use for toast
-
getIcon(
IconType iconType) → Widget? - transform IconType to Icon
-
imagePreview<
T> (List< String> images, {String? currentImage, bool? barrierDismissible, Color? barrierColor, Rect? startRect}) → Future<T?> - A wrapper of ShirneDialog.imagePreview
-
initialize(
[BuildContext? context]) → void - initialize a MyDialog instance
-
loading(
String message, {bool? showProgress, Duration? duration, Widget builder(BuildContext, double)?, LoadingStyle? style}) → ProgressController - A wrapper of ShirneDialog.loading
-
modal<
T> (Widget modal, {bool? barrierDismissible, Color? barrierColor}) → Future< T?> - A wrapper of ShirneDialog.modal
-
of(
[BuildContext? context]) → ShirneDialog - return a ShirneDialog instance or construct new instance with BuildContext
-
overlayModal(
Widget child, {AnimationConfig? animate, AnimationConfig? leaveAnimate}) → EntryController -
popup<
T> (Widget body, {double? height, double? maxHeight, BoxDecoration? decoration, double? borderRadius, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Color? barrierColor, Color? backgroundColor, bool? isDismissible, bool? isScrollControlled, double? elevation, WidgetBuilder? dragHandlerBuilder, bool? showClose, Widget? closeButton, String? closeSemanticsLabel}) → Future< T?> - A wrapper of ShirneDialog.popup
-
prompt(
{String? defaultValue, Widget? label, Widget builder(BuildContext, TextEditingController)?, FutureOr< bool> onConfirm(String)?, String title = '', String? buttonText, Widget? titleWidget, String? cancelText, ModalStyle? style, bool? barrierDismissible, Color? barrierColor}) → Future<String?> - A wrapper of ShirneDialog.prompt
-
snack(
dynamic message, {VoidCallback? onTap, Widget? action, Duration? duration, Alignment? align, double? width, SnackStyle? style}) → EntryController - A wrapper of ShirneDialog.snack
-
toast(
String message, {Duration? duration, Widget? icon, IconType? iconType, ToastStyle? style}) → void - A wrapper of ShirneDialog.toast
Constants
- defaultTheme → const ShirneDialogTheme
- Default ShirneDialogTheme