showAsDialog<T> method
Future<T?>
showAsDialog<T>(
- BuildContext context, {
- PopupAnimation animation = PopupAnimation.scale,
- bool barrierDismissible = true,
- Color? barrierColor,
- EdgeInsets? margin,
- EdgeInsets? padding,
- double? width,
- double? height,
- BorderRadius? borderRadius,
- Color? backgroundColor,
Show ContentView as center dialog Usage:
final result = await myContentView.showAsDialog(context);
Implementation
Future<T?> showAsDialog<T>(
BuildContext context, {
PopupAnimation animation = PopupAnimation.scale,
bool barrierDismissible = true,
Color? barrierColor,
EdgeInsets? margin,
EdgeInsets? padding,
double? width,
double? height,
BorderRadius? borderRadius,
Color? backgroundColor,
}) async {
return await showPopup<T>(
context,
position: PopupPosition.center,
animation: animation,
barrierDismissible: barrierDismissible,
barrierColor: barrierColor,
margin: margin,
padding: padding,
width: width,
height: height,
borderRadius: borderRadius,
backgroundColor: backgroundColor,
);
}