snackBarTheme static method

SnackBarThemeData snackBarTheme({
  1. double? elevation = kSnackBarElevation,
  2. Color? backgroundColor,
})

An opinionated SnackBarThemeData with custom elevation.

Its elevation defaults to kSnackBarElevation (4).

Implementation

static SnackBarThemeData snackBarTheme({
  /// SnackBar elevation defaults to [kSnackBarElevation] 4.
  final double? elevation = kSnackBarElevation,

  /// Default value for [backgroundColor].
  ///
  /// If null, [SnackBar] defaults to dark grey: `Color(0xFF323232)`.
  ///
  /// FlexColorScheme set a dark primary tinted color instead when it uses
  /// this helper.
  final Color? backgroundColor,
}) =>
    SnackBarThemeData(
      elevation: elevation,
      backgroundColor: backgroundColor,
    );