CupertinoNavigationBar constructor Null safety

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

Creates a navigation bar in the iOS style.

Implementation

const CupertinoNavigationBar({
  Key? key,
  this.leading,
  this.automaticallyImplyLeading = true,
  this.automaticallyImplyMiddle = true,
  this.previousPageTitle,
  this.middle,
  this.trailing,
  this.border = _kDefaultNavBarBorder,
  this.backgroundColor,
  this.brightness,
  this.padding,
  this.transitionBetweenRoutes = true,
  this.heroTag = _defaultHeroTag,
}) : assert(automaticallyImplyLeading != null),
     assert(automaticallyImplyMiddle != null),
     assert(transitionBetweenRoutes != null),
     assert(
       heroTag != null,
       'heroTag cannot be null. Use transitionBetweenRoutes = false to '
       'disable Hero transition on this navigation bar.',
     ),
     assert(
       !transitionBetweenRoutes || identical(heroTag, _defaultHeroTag),
       'Cannot specify a heroTag override if this navigation bar does not '
       'transition due to transitionBetweenRoutes = false.',
     ),
     super(key: key);