SliverAppBar constructor

const SliverAppBar({Key key, Widget leading, bool automaticallyImplyLeading: true, Widget title, List<Widget> actions, Widget flexibleSpace, PreferredSizeWidget bottom, double elevation, bool forceElevated: false, Color backgroundColor, Brightness brightness, IconThemeData iconTheme, TextTheme textTheme, bool primary: true, bool centerTitle, double titleSpacing: NavigationToolbar.kMiddleSpacing, double expandedHeight, bool floating: false, bool pinned: false, bool snap: false })

Creates a material design app bar that can be placed in a CustomScrollView.

The arguments forceElevated, primary, floating, pinned, snap and automaticallyImplyLeading must not be null.

Implementation

const SliverAppBar({
  Key key,
  this.leading,
  this.automaticallyImplyLeading = true,
  this.title,
  this.actions,
  this.flexibleSpace,
  this.bottom,
  this.elevation,
  this.forceElevated = false,
  this.backgroundColor,
  this.brightness,
  this.iconTheme,
  this.textTheme,
  this.primary = true,
  this.centerTitle,
  this.titleSpacing = NavigationToolbar.kMiddleSpacing,
  this.expandedHeight,
  this.floating = false,
  this.pinned = false,
  this.snap = false,
}) : assert(automaticallyImplyLeading != null),
     assert(forceElevated != null),
     assert(primary != null),
     assert(titleSpacing != null),
     assert(floating != null),
     assert(pinned != null),
     assert(snap != null),
     assert(floating || !snap, 'The "snap" argument only makes sense for floating app bars.'),
     super(key: key);