StreamBannerThemeData class

Theme data for customizing StreamBanner widgets.

Each type's colors and text style are set through neutral, loading and error. The geometry (shape, padding, spacing and constraints) is shared by every type. A property left null falls back to the design system default.

{@tool snippet}

Customize banners globally:

StreamTheme(
  bannerTheme: StreamBannerThemeData(
    error: StreamBannerThemeStyle(iconColor: Colors.red),
    padding: EdgeInsets.all(16),
  ),
)

{@end-tool}

See also:

Annotations

Constructors

StreamBannerThemeData({StreamBannerThemeStyle? neutral, StreamBannerThemeStyle? loading, StreamBannerThemeStyle? error, OutlinedBorder? shape, EdgeInsetsGeometry? padding, double? spacing, BoxConstraints? constraints})
Creates banner theme data with optional overrides.
const

Properties

canMerge → bool
no setterinherited
constraints → BoxConstraints?
Constraints on the banner's size.
final
error → StreamBannerThemeStyle?
The style of StreamBannerType.error banners.
final
hashCode → int
The hash code for this object.
no setterinherited
loading → StreamBannerThemeStyle?
The style of StreamBannerType.loading banners.
final
neutral → StreamBannerThemeStyle?
The style of StreamBannerType.neutral banners.
final
padding → EdgeInsetsGeometry?
The padding between the banner edge and its content.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shape → OutlinedBorder?
The shape of the banner.
final
spacing → double?
The gap between the icon and the title.
final

Methods

copyWith({StreamBannerThemeStyle? neutral, StreamBannerThemeStyle? loading, StreamBannerThemeStyle? error, OutlinedBorder? shape, EdgeInsetsGeometry? padding, double? spacing, BoxConstraints? constraints}) → StreamBannerThemeData
inherited
merge(StreamBannerThemeData? other) → StreamBannerThemeData
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

lerp(StreamBannerThemeData? a, StreamBannerThemeData? b, double t) → StreamBannerThemeData?
Linearly interpolate between two StreamBannerThemeData objects.