SnackBarThemeData constructor Null safety

const SnackBarThemeData(
  1. {Color? backgroundColor,
  2. Color? actionTextColor,
  3. Color? disabledActionTextColor,
  4. TextStyle? contentTextStyle,
  5. double? elevation,
  6. ShapeBorder? shape,
  7. SnackBarBehavior? behavior}
)

Creates a theme that can be used for ThemeData.snackBarTheme.

The elevation must be null or non-negative.

Implementation

const SnackBarThemeData({
  this.backgroundColor,
  this.actionTextColor,
  this.disabledActionTextColor,
  this.contentTextStyle,
  this.elevation,
  this.shape,
  this.behavior,
}) : assert(elevation == null || elevation >= 0.0);