alert<T> static method
Future<T?>
alert<T>({
- required Widget content,
- bool barrierDismissible = true,
- Color? barrierColor,
- String? barrierLabel,
- bool useSafeArea = true,
- RouteSettings? routeSettings,
- Offset? anchorPoint,
- TraversalEdgeBehavior? traversalEdgeBehavior,
alert Mostrara un showDialog y requiere de un Widget y recibe todas las variables que este requiere
Implementation
static Future<T?> alert<T>({
required Widget content,
bool barrierDismissible = true,
Color? barrierColor,
String? barrierLabel,
bool useSafeArea = true,
bool useRootNavigator = true,
RouteSettings? routeSettings,
Offset? anchorPoint,
TraversalEdgeBehavior? traversalEdgeBehavior,
}) {
return showDialog<T>(
barrierDismissible: barrierDismissible,
barrierColor: barrierColor,
barrierLabel: barrierLabel,
useSafeArea: useSafeArea,
useRootNavigator: useRootNavigator,
anchorPoint: anchorPoint,
routeSettings: routeSettings,
traversalEdgeBehavior: traversalEdgeBehavior,
context: _contextServ,
builder: (_) => content);
}