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. bool automaticBackgroundVisibility = true,
  13. bool enableBackgroundFilterBlur = true,
  14. Brightness? brightness,
  15. EdgeInsetsDirectional? padding,
  16. bool transitionBetweenRoutes = true,
  17. Object heroTag = _defaultHeroTag,
  18. 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.automaticBackgroundVisibility = true,
  this.enableBackgroundFilterBlur = true,
  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.',
     );