showInDialog method

  1. @override
Future<T?>? showInDialog(
  1. BuildContext context, {
  2. bool barrierDismissible = true,
  3. Color? barrierColor = Colors.black54,
  4. String? barrierLabel,
  5. bool useSafeArea = true,
  6. bool useRootNavigator = true,
  7. RouteSettings? routeSettings,
  8. Offset? anchorPoint,
  9. TraversalEdgeBehavior? traversalEdgeBehavior,
  10. Key? key,
  11. Widget? icon,
  12. EdgeInsetsGeometry? iconPadding,
  13. Color? iconColor,
  14. Widget? title,
  15. EdgeInsetsGeometry? titlePadding,
  16. TextStyle? titleTextStyle,
  17. Widget? content,
  18. EdgeInsetsGeometry? contentPadding,
  19. TextStyle? contentTextStyle,
  20. List<Widget>? actions,
  21. EdgeInsetsGeometry? actionsPadding,
  22. MainAxisAlignment? actionsAlignment,
  23. OverflowBarAlignment? actionsOverflowAlignment,
  24. VerticalDirection? actionsOverflowDirection,
  25. double? actionsOverflowButtonSpacing,
  26. EdgeInsetsGeometry? buttonPadding,
  27. Color? backgroundColor,
  28. double? elevation,
  29. Color? shadowColor,
  30. Color? surfaceTintColor,
  31. String? semanticLabel,
  32. EdgeInsets insetPadding = const EdgeInsets.symmetric(vertical: 24, horizontal: 40),
  33. Clip clipBehavior = Clip.none,
  34. ShapeBorder? shape,
  35. AlignmentGeometry? alignment,
  36. bool scrollable = false,
  37. bool? requestFocus,
  38. AnimationStyle? animationStyle,
})
override

Twin of a Material's showDialog function.

Implementation

@override
Future<T?>? showInDialog(
  BuildContext context, {
  bool barrierDismissible = true,
  Color? barrierColor = Colors.black54,
  String? barrierLabel,
  bool useSafeArea = true,
  bool useRootNavigator = true,
  RouteSettings? routeSettings,
  Offset? anchorPoint,
  TraversalEdgeBehavior? traversalEdgeBehavior,
  Key? key,
  Widget? icon,
  EdgeInsetsGeometry? iconPadding,
  Color? iconColor,
  Widget? title,
  EdgeInsetsGeometry? titlePadding,
  TextStyle? titleTextStyle,
  Widget? content,
  EdgeInsetsGeometry? contentPadding,
  TextStyle? contentTextStyle,
  List<Widget>? actions,
  EdgeInsetsGeometry? actionsPadding,
  MainAxisAlignment? actionsAlignment,
  OverflowBarAlignment? actionsOverflowAlignment,
  VerticalDirection? actionsOverflowDirection,
  double? actionsOverflowButtonSpacing,
  EdgeInsetsGeometry? buttonPadding,
  Color? backgroundColor,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  String? semanticLabel,
  EdgeInsets insetPadding = const EdgeInsets.symmetric(
    vertical: 24,
    horizontal: 40,
  ),
  Clip clipBehavior = Clip.none,
  ShapeBorder? shape,
  AlignmentGeometry? alignment,
  bool scrollable = false,
  bool? requestFocus,
  AnimationStyle? animationStyle,
}) => showDialog(
  context: context,
  builder: (newContext) => AlertDialog(
    iconPadding: iconPadding,
    iconColor: iconColor,
    title: title,
    titlePadding: titlePadding,
    titleTextStyle: titleTextStyle,
    content: SizedBox(
      width: double.maxFinite,
      child: copyWith(
        items: resolvedItems(newContext),
        onSelect: (selected) => maybeSelectAndPop(selected, newContext),
      ),
    ),
    contentPadding: contentPadding,
    contentTextStyle: contentTextStyle,
    actions: actions,
    actionsPadding: actionsPadding,
    actionsAlignment: actionsAlignment,
    actionsOverflowAlignment: actionsOverflowAlignment,
    actionsOverflowDirection: actionsOverflowDirection,
    actionsOverflowButtonSpacing: actionsOverflowButtonSpacing,
    buttonPadding: buttonPadding,
    backgroundColor: backgroundColor,
    elevation: elevation,
    shadowColor: shadowColor,
    surfaceTintColor: surfaceTintColor,
    semanticLabel: semanticLabel,
    insetPadding: insetPadding,
    clipBehavior: clipBehavior,
    shape: shape,
    alignment: alignment,
    scrollable: scrollable,
  ),
  barrierDismissible: barrierDismissible,
  barrierColor: barrierColor,
  barrierLabel: barrierLabel,
  useSafeArea: useSafeArea,
  useRootNavigator: useRootNavigator,
  routeSettings: routeSettings,
  anchorPoint: anchorPoint,
  traversalEdgeBehavior: traversalEdgeBehavior,
  requestFocus: requestFocus,
  animationStyle: animationStyle,
);