SliverNewGradientAppBar constructor

const SliverNewGradientAppBar({
  1. Key? key,
  2. Widget? leading,
  3. bool automaticallyImplyLeading = true,
  4. Widget? title,
  5. List<Widget>? actions,
  6. Widget? flexibleSpace,
  7. PreferredSizeWidget? bottom,
  8. double? elevation,
  9. bool forceElevated = false,
  10. Gradient? gradient,
  11. Brightness? brightness,
  12. IconThemeData? iconTheme,
  13. IconThemeData? actionsIconTheme,
  14. TextTheme? textTheme,
  15. bool primary = true,
  16. bool? centerTitle,
  17. double titleSpacing = NavigationToolbar.kMiddleSpacing,
  18. double? expandedHeight,
  19. bool floating = false,
  20. bool pinned = false,
  21. bool snap = false,
  22. ShapeBorder? shape,
})

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 SliverNewGradientAppBar({
  Key? key,
  this.leading,
  this.automaticallyImplyLeading = true,
  this.title,
  this.actions,
  this.flexibleSpace,
  this.bottom,
  this.elevation,
  this.forceElevated = false,
  this.gradient,
  this.brightness,
  this.iconTheme,
  this.actionsIconTheme,
  this.textTheme,
  this.primary = true,
  this.centerTitle,
  this.titleSpacing = NavigationToolbar.kMiddleSpacing,
  this.expandedHeight,
  this.floating = false,
  this.pinned = false,
  this.snap = false,
  this.shape,
})  : assert(floating || !snap,
          'The "snap" argument only makes sense for floating app bars.'),
      super(key: key);