CupertinoTabScaffold constructor Null safety
- {Key? key,
- required CupertinoTabBar tabBar,
- required IndexedWidgetBuilder tabBuilder,
- CupertinoTabController? controller,
- Color? backgroundColor,
- bool resizeToAvoidBottomInset = true,
- String? restorationId}
Creates a layout for applications with a tab bar at the bottom.
The tabBar and tabBuilder arguments must not be null.
Implementation
CupertinoTabScaffold({
super.key,
required this.tabBar,
required this.tabBuilder,
this.controller,
this.backgroundColor,
this.resizeToAvoidBottomInset = true,
this.restorationId,
}) : assert(tabBar != null),
assert(tabBuilder != null),
assert(
controller == null || controller.index < tabBar.items.length,
"The CupertinoTabController's current index ${controller.index} is "
'out of bounds for the tab bar with ${tabBar.items.length} tabs',
);