FDialog.adaptive constructor
FDialog.adaptive({
- required List<
Widget> actions, - FDialogStyle? style,
- String? semanticsLabel,
- BoxConstraints constraints = const BoxConstraints(minWidth: 280, maxWidth: 560),
- Widget? title,
- Widget? body,
- 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.semanticsLabel,
this.constraints = const BoxConstraints(minWidth: 280, maxWidth: 560),
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),
});