TAlertTheme class

Theme configuration for TAlert.

TAlertTheme defines the visual style of alerts, including:

  • Background color
  • Padding and alignment
  • Text styles (title, content)
  • Button styles (close, confirm)
  • Icon size

Usage

TAlertTheme(
  backgroundColor: Colors.white,
  contentStyle: TextStyle(fontSize: 16),
  confirmButtonType: TButtonType.solid,
)

Constructors

TAlertTheme({required Color backgroundColor, EdgeInsets? insetPadding = const EdgeInsets.all(12.0), EdgeInsets? contentPadding = const EdgeInsets.all(20), EdgeInsets? actionsPadding = const EdgeInsets.only(bottom: 15), MainAxisAlignment actionsAlignment = MainAxisAlignment.center, double? iconSize = 64, required TextStyle titleStyle, required TextStyle contentStyle, TextAlign? contentTextAlign = TextAlign.center, double? closeButtonWidth = 100, double? confirmButtonWidth = 80, TButtonType? closeButtonType = TButtonType.softText, TButtonType? confirmButtonType = TButtonType.softText, MaterialColor? closeButtonColor})
Creates an alert theme.
const
TAlertTheme.defaultTheme(ColorScheme colors)
Creates a default theme derived from the context colors.
factory

Properties

actionsAlignment → MainAxisAlignment
final
actionsPadding → EdgeInsets?
final
backgroundColor → Color
final
closeButtonColor → MaterialColor?
final
closeButtonType → TButtonType?
final
closeButtonWidth → double?
final
confirmButtonType → TButtonType?
final
confirmButtonWidth → double?
final
contentPadding → EdgeInsets?
final
contentStyle → TextStyle
final
contentTextAlign → TextAlign?
final
hashCode → int
The hash code for this object.
no setterinherited
iconSize → double?
final
insetPadding → EdgeInsets?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
titleStyle → TextStyle
final

Methods

copyWith({Color? backgroundColor, EdgeInsets? insetPadding, EdgeInsets? contentPadding, EdgeInsets? actionsPadding, MainAxisAlignment? actionsAlignment, double? iconSize, TextStyle? titleStyle, TextStyle? contentStyle, TextAlign? contentTextAlign, double? closeButtonWidth, TButtonType? closeButtonType, MaterialColor? closeButtonColor, double? confirmButtonWidth, TButtonType? confirmButtonType}) → TAlertTheme
Creates a copy of the theme with updated properties.
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