AdaptiveScaffold constructor

const AdaptiveScaffold({
  1. Key? key,
  2. required List<NavigationDestination> destinations,
  3. int? selectedIndex = 0,
  4. Widget? leadingUnextendedNavRail,
  5. Widget? leadingExtendedNavRail,
  6. Widget? trailingNavRail,
  7. WidgetBuilder? smallBody,
  8. WidgetBuilder? body,
  9. WidgetBuilder? largeBody,
  10. WidgetBuilder? smallSecondaryBody,
  11. WidgetBuilder? secondaryBody,
  12. WidgetBuilder? largeSecondaryBody,
  13. double? bodyRatio,
  14. Breakpoint smallBreakpoint = Breakpoints.small,
  15. Breakpoint mediumBreakpoint = Breakpoints.medium,
  16. Breakpoint largeBreakpoint = Breakpoints.large,
  17. Breakpoint drawerBreakpoint = Breakpoints.smallDesktop,
  18. bool internalAnimations = true,
  19. Duration transitionDuration = const Duration(seconds: 1),
  20. Axis bodyOrientation = Axis.horizontal,
  21. void onSelectedIndexChange(
    1. int
    )?,
  22. bool useDrawer = true,
  23. PreferredSizeWidget? appBar,
  24. double navigationRailWidth = 72,
  25. double extendedNavigationRailWidth = 192,
  26. 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',
      );