MyScaffold constructor
const
MyScaffold({
- Key? key,
- List<
MyAdaptiveNavigationItem> ? drawer, - @Deprecated('使用drawer参数代替') List<
MyAdaptiveNavigationItem> ? items, - @Deprecated('不再需要pages参数') List<
Widget> ? pages, - Widget? body,
- Widget? trailing,
- PreferredSizeWidget? appBar,
- Widget? floatingActionButton,
- double drawerWidthRatio = 0.88,
- double compactBreakpoint = 600.0,
- double mediumBreakpoint = 840.0,
- double expandedBreakpoint = 1200.0,
- double largeBreakpoint = 1600.0,
- @Deprecated('请使用 compactBreakpoint 代替') double? smallBreakpoint,
- int initialSelectedIndex = 0,
- bool alwaysShowScrollbar = false,
- 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, // 编译期占位;运行时由下方校验
'',
);