CupertinoSliverNavigationBar constructor Null safety

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

Creates a navigation bar for scrolling lists.

The largeTitle argument is required and must not be null.

Implementation

const CupertinoSliverNavigationBar({
  Key? 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.',
     ),
     super(key: key);