snackBarThemeData static method
SnackBarThemeData
snackBarThemeData(
- Palette colors,
- TextTheme textTheme, [
- MonetShapes? shapes
])
Implementation
static SnackBarThemeData snackBarThemeData(
Palette colors,
TextTheme textTheme, [
MonetShapes? shapes,
]) {
shapes ??= _defaultShapes;
return SnackBarThemeData(
backgroundColor: colors.color,
actionTextColor: colors.colorText,
disabledActionTextColor: colors.colorText,
contentTextStyle: textTheme.bodyMedium!.copyWith(color: colors.colorText),
elevation: modalElevation,
shape: shapes.border(
side: BorderSide(color: colors.colorBorder, width: 2),
),
behavior: SnackBarBehavior.floating,
width: null, // allows use of margin instead
insetPadding: const EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 10.0),
showCloseIcon: true,
closeIconColor: colors.colorIcon,
actionOverflowThreshold: 0.25, // match default, the percentage threshold for action widget's width before it overflows to a new line.
actionBackgroundColor: colors.color,
disabledActionBackgroundColor: colors.color,
);
}