CupertinoSliverNavigationBar constructor

const CupertinoSliverNavigationBar(
  1. {Key? key,
  2. Widget? largeTitle,
  3. Widget? leading,
  4. bool automaticallyImplyLeading = true,
  5. bool automaticallyImplyTitle = true,
  6. bool alwaysShowMiddle = true,
  7. String? previousPageTitle,
  8. Widget? middle,
  9. Widget? trailing,
  10. Border? border = _kDefaultNavBarBorder,
  11. Color? backgroundColor,
  12. Brightness? brightness,
  13. EdgeInsetsDirectional? padding,
  14. bool transitionBetweenRoutes = true,
  15. Object heroTag = _defaultHeroTag,
  16. bool stretch = false}
)

Creates a navigation bar for scrolling lists.

If automaticallyImplyTitle is false, then the largeTitle argument is required.

Implementation

const CupertinoSliverNavigationBar({
  super.key,
  this.largeTitle,
  this.leading,
  this.automaticallyImplyLeading = true,
  this.automaticallyImplyTitle = true,
  this.alwaysShowMiddle = 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(
       automaticallyImplyTitle || largeTitle != null,
       'No largeTitle has been provided but automaticallyImplyTitle is also '
       'false. Either provide a largeTitle or set automaticallyImplyTitle to '
       'true.',
     );