FlexibleSpaceBar constructor Null safety

const FlexibleSpaceBar(
  1. {Key? key,
  2. Widget? title,
  3. Widget? background,
  4. bool? centerTitle,
  5. EdgeInsetsGeometry? titlePadding,
  6. CollapseMode collapseMode,
  7. List<StretchMode> stretchModes}
)

Creates a flexible space bar.

Most commonly used in the AppBar.flexibleSpace field.

Implementation

const FlexibleSpaceBar({
  Key? key,
  this.title,
  this.background,
  this.centerTitle,
  this.titlePadding,
  this.collapseMode = CollapseMode.parallax,
  this.stretchModes = const <StretchMode>[StretchMode.zoomBackground],
}) : assert(collapseMode != null),
     super(key: key);