StacSnackBarThemeData class
A Stac model representing Flutter's SnackBarThemeData.
Defines the theme for snack bars, including colors, elevation, shape, text styles, and behavior properties.
{@tool snippet} Dart Example:
StacSnackBarThemeData(
backgroundColor: '#323232',
contentTextStyle: StacTextStyle(color: '#FFFFFF'),
behavior: SnackBarBehavior.floating,
)
{@end-tool}
{@tool snippet} JSON Example:
{
"backgroundColor": "#323232",
"elevation": 6.0,
"contentTextStyle": {"color": "#FFFFFF"},
"actionTextColor": "#FF9800",
"behavior": "floating",
"showCloseIcon": true
}
{@end-tool}
- Implemented types
- Available extensions
- Annotations
-
- @JsonSerializable.new()
Constructors
- StacSnackBarThemeData({StacSnackBarBehavior? behavior, String? backgroundColor, double? elevation, StacShapeBorder? shape, double? width, StacTextStyle? contentTextStyle, String? actionTextColor, String? disabledActionTextColor, StacEdgeInsets? insetPadding, StacDismissDirection? dismissDirection, bool? showCloseIcon, String? closeIconColor, double? actionOverflowThreshold, String? actionBackgroundColor, String? disabledActionBackgroundColor})
-
Creates a StacSnackBarThemeData with the given properties.
const
-
StacSnackBarThemeData.fromJson(Map<
String, dynamic> json) -
Creates a StacSnackBarThemeData from JSON.
factory
Properties
- actionBackgroundColor → String?
-
The background color of the snack bar's action.
final
- actionOverflowThreshold → double?
-
The threshold for action overflow.
final
- actionTextColor → String?
-
The color of the snack bar's action text.
final
- backgroundColor → String?
-
The background color of the snack bar.
final
- behavior → StacSnackBarBehavior?
-
The behavior of the snack bar.
final
- closeIconColor → String?
-
The color of the close icon.
final
- contentTextStyle → StacTextStyle?
-
The text style for the snack bar's content.
final
- disabledActionBackgroundColor → String?
-
The background color of the snack bar's disabled action.
final
- disabledActionTextColor → String?
-
The color of the snack bar's disabled action text.
final
- dismissDirection → StacDismissDirection?
-
The direction in which the snack bar can be dismissed.
final
- elevation → double?
-
The z-coordinate at which to place this snack bar relative to its parent.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- insetPadding → StacEdgeInsets?
-
The padding around the snack bar's content.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → StacShapeBorder?
-
The shape of the snack bar's border.
final
- showCloseIcon → bool?
-
Whether to show a close icon on the snack bar.
final
- width → double?
-
The width of the snack bar.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
BuildContext context) → SnackBarThemeData? -
Available on StacSnackBarThemeData, provided by the StacSnackBarThemeDataParser extension
-
toJson(
) → Map< String, dynamic> -
Converts this snack bar theme to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited