MyScaffold constructor

const MyScaffold({
  1. Key? key,
  2. List<MyAdaptiveNavigationItem>? drawer,
  3. @Deprecated('使用drawer参数代替') List<MyAdaptiveNavigationItem>? items,
  4. @Deprecated('不再需要pages参数') List<Widget>? pages,
  5. Widget? body,
  6. Widget? trailing,
  7. Widget? navigationHeader,
  8. bool useBottomNavigationOnSmall = false,
  9. PreferredSizeWidget? appBar,
  10. Widget? floatingActionButton,
  11. double drawerWidthRatio = 0.88,
  12. double compactBreakpoint = 600.0,
  13. double mediumBreakpoint = 840.0,
  14. double expandedBreakpoint = 1200.0,
  15. double largeBreakpoint = 1600.0,
  16. @Deprecated('请使用 compactBreakpoint 代替') double? smallBreakpoint,
  17. int initialSelectedIndex = 0,
  18. bool alwaysShowScrollbar = false,
  19. bool autoScrollToSelected = true,
})

Implementation

const MyScaffold({
  super.key,
  this.drawer,
  @Deprecated('使用drawer参数代替') this.items,
  @Deprecated('不再需要pages参数') this.pages,
  this.body,
  this.trailing,
  this.navigationHeader,
  this.useBottomNavigationOnSmall = false,
  this.appBar,
  this.floatingActionButton,
  this.drawerWidthRatio = 0.88,
  this.compactBreakpoint = 600.0,
  this.mediumBreakpoint = 840.0,
  this.expandedBreakpoint = 1200.0,
  this.largeBreakpoint = 1600.0,
  @Deprecated('请使用 compactBreakpoint 代替') this.smallBreakpoint,
  this.initialSelectedIndex = 0,
  this.alwaysShowScrollbar = false,
  this.autoScrollToSelected = true,
})  : assert(
        drawer == null || items == null,
        '不能同时提供drawer和items参数,请使用drawer参数。',
      ),
      assert(
        600.0 <= 840.0, // 编译期占位;运行时由下方校验
        '',
      );