CupertinoSliverNavigationBar constructor Null safety
- {Key? key,
- Widget? largeTitle,
- Widget? leading,
- bool automaticallyImplyLeading = true,
- bool automaticallyImplyTitle = true,
- String? previousPageTitle,
- Widget? middle,
- Widget? trailing,
- Border? border = _kDefaultNavBarBorder,
- Color? backgroundColor,
- Brightness? brightness,
- EdgeInsetsDirectional? padding,
- bool transitionBetweenRoutes = true,
- Object heroTag = _defaultHeroTag,
- bool stretch = false}
Creates a navigation bar for scrolling lists.
The largeTitle argument is required and must not be null.
Implementation
const CupertinoSliverNavigationBar({
super.key,
this.largeTitle,
this.leading,
this.automaticallyImplyLeading = true,
this.automaticallyImplyTitle = true,
this.previousPageTitle,
this.middle,
this.trailing,
this.border = _kDefaultNavBarBorder,
this.backgroundColor,
this.brightness,
this.padding,
this.transitionBetweenRoutes = true,
this.heroTag = _defaultHeroTag,
this.stretch = false,
}) : assert(automaticallyImplyLeading != null),
assert(automaticallyImplyTitle != null),
assert(
automaticallyImplyTitle == true || largeTitle != null,
'No largeTitle has been provided but automaticallyImplyTitle is also '
'false. Either provide a largeTitle or set automaticallyImplyTitle to '
'true.',
);