AdaptiveScaffold constructor
const
AdaptiveScaffold({
- Key? key,
- required List<
NavigationDestination> destinations, - int? selectedIndex = 0,
- WidgetBuilder? smallBody,
- WidgetBuilder? body,
- WidgetBuilder? largeBody,
- WidgetBuilder? smallSecondaryBody,
- WidgetBuilder? secondaryBody,
- WidgetBuilder? largeSecondaryBody,
- double? bodyRatio,
- Breakpoint smallBreakpoint = Breakpoints.small,
- Breakpoint mediumBreakpoint = Breakpoints.medium,
- Breakpoint largeBreakpoint = Breakpoints.large,
- Breakpoint drawerBreakpoint = Breakpoints.smallDesktop,
- bool internalAnimations = true,
- Duration transitionDuration = const Duration(seconds: 1),
- Axis bodyOrientation = Axis.horizontal,
- void onSelectedIndexChange()?,
- bool useDrawer = true,
- PreferredSizeWidget? appBar,
- Breakpoint? appBarBreakpoint,
Returns a const AdaptiveScaffold by passing information down to an AdaptiveLayout.
Implementation
const AdaptiveScaffold({
super.key,
required this.destinations,
this.selectedIndex = 0,
this.leadingUnextendedNavRail,
this.leadingExtendedNavRail,
this.trailingNavRail,
this.smallBody,
this.body,
this.largeBody,
this.smallSecondaryBody,
this.secondaryBody,
this.largeSecondaryBody,
this.bodyRatio,
this.smallBreakpoint = Breakpoints.small,
this.mediumBreakpoint = Breakpoints.medium,
this.largeBreakpoint = Breakpoints.large,
this.drawerBreakpoint = Breakpoints.smallDesktop,
this.internalAnimations = true,
this.transitionDuration = const Duration(seconds: 1),
this.bodyOrientation = Axis.horizontal,
this.onSelectedIndexChange,
this.useDrawer = true,
this.appBar,
this.navigationRailWidth = 72,
this.extendedNavigationRailWidth = 192,
this.appBarBreakpoint,
}) : assert(
destinations.length >= 2,
'At least two destinations are required',
);