FDialog.adaptive constructor

FDialog.adaptive({
  1. required List<Widget> actions,
  2. FDialogStyle? style,
  3. Duration insetAnimationDuration = _defaultDuration,
  4. Curve insetAnimationCurve = Curves.decelerate,
  5. String? semanticLabel,
  6. Widget? title,
  7. Widget? body,
  8. Key? key,
})

Creates a adaptive FDialog that lays out the actions vertically on FBreakpoints.sm devices and horizontally on larger devices.

Implementation

FDialog.adaptive({
  required List<Widget> actions,
  this.style,
  this.insetAnimationDuration = _defaultDuration,
  this.insetAnimationCurve = Curves.decelerate,
  this.semanticLabel,
  Widget? title,
  Widget? body,
  super.key,
}) : builder =
         ((context, style) => switch (MediaQuery.sizeOf(context).width) {
           final width when width < context.theme.breakpoints.sm => VerticalContent(
             style: style.verticalStyle,
             title: title,
             body: body,
             actions: actions,
           ),
           _ => HorizontalContent(style: style.horizontalStyle, title: title, body: body, actions: actions),
         });