MyDialog class
static class to call alert, confirm, toast etc.
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
-
no setter
- theme → ShirneDialogTheme
-
no setter
Static Methods
-
alert(
dynamic message, {String? buttonText, String title = '', Widget? titleWidget, bool barrierDismissible = true, Color? barrierColor = Colors.black54}) → Future< bool?> -
confirm(
dynamic message, {String? buttonText, String title = '', Widget? titleWidget, String? cancelText, bool barrierDismissible = true, Color? barrierColor = Colors.black54}) → Future< bool?> -
getAlignment(
String align) → Alignment - transform string to Alignment that use for toast
-
getIcon(
IconType iconType) → Widget? -
imagePreview(
List< String> images, {String? currentImage, bool barrierDismissible = true, Color? barrierColor = Colors.black54}) → Future -
initialize(
[BuildContext? context]) → void - initialize a MyDialog instance
-
loading(
String message, {dynamic showProgress = false, dynamic showOverlay = true, double time = 3}) → DialogController -
modal<
T> (Widget body, List< Widget> buttons, {String title = '', Widget? titleWidget, bool barrierDismissible = false, Color? barrierColor = Colors.black54}) → Future<T?> -
of(
[BuildContext? context]) → ShirneDialog - return a MyDialog instance or construct new instance with BuildContext
-
popup<
T> (Widget body, {dynamic barrierDismissible = false, double height = 0, double borderRound = 10, EdgeInsetsGeometry padding = const EdgeInsets.all(10), Color barrierColor = Colors.black54, Color? backgroundColor, bool isDismissible = true, bool isScrollControlled = false, double? elevation, bool showClose = true, Widget closeButton = const Icon(Icons.cancel, color: Colors.black38)}) → Future< T?> -
snack(
String message, {Widget? action, int duration = 3, Alignment? align, double width = 0.7}) → EntryController -
toast(
String message, {int duration = 2, Alignment? align, Widget? icon, IconType iconType = IconType.none}) → void