AppBarTheme constructor
- Key? key,
- @Deprecated('Use backgroundColor instead. ' 'This feature was deprecated after v3.33.0-0.2.pre.') Color? color,
- Color? backgroundColor,
- Color? foregroundColor,
- double? elevation,
- double? scrolledUnderElevation,
- Color? shadowColor,
- Color? surfaceTintColor,
- ShapeBorder? shape,
- IconThemeData? iconTheme,
- IconThemeData? actionsIconTheme,
- bool? centerTitle,
- double? titleSpacing,
- double? leadingWidth,
- double? toolbarHeight,
- TextStyle? toolbarTextStyle,
- TextStyle? titleTextStyle,
- SystemUiOverlayStyle? systemOverlayStyle,
- EdgeInsetsGeometry? actionsPadding,
- AppBarThemeData? data,
- Widget? child,
Creates a theme that can be used for ThemeData.appBarTheme.
Implementation
const AppBarTheme({
super.key,
@Deprecated(
'Use backgroundColor instead. '
'This feature was deprecated after v3.33.0-0.2.pre.',
)
Color? color,
Color? backgroundColor,
Color? foregroundColor,
double? elevation,
double? scrolledUnderElevation,
Color? shadowColor,
Color? surfaceTintColor,
ShapeBorder? shape,
IconThemeData? iconTheme,
IconThemeData? actionsIconTheme,
bool? centerTitle,
double? titleSpacing,
double? leadingWidth,
double? toolbarHeight,
TextStyle? toolbarTextStyle,
TextStyle? titleTextStyle,
SystemUiOverlayStyle? systemOverlayStyle,
EdgeInsetsGeometry? actionsPadding,
AppBarThemeData? data,
Widget? child,
}) : assert(
color == null || backgroundColor == null,
'The color and backgroundColor parameters mean the same thing. Only specify one.',
),
assert(
data == null ||
(color ??
backgroundColor ??
foregroundColor ??
elevation ??
scrolledUnderElevation ??
shadowColor ??
surfaceTintColor ??
shape ??
iconTheme ??
actionsIconTheme ??
centerTitle ??
titleSpacing ??
leadingWidth ??
toolbarHeight ??
toolbarTextStyle ??
titleTextStyle ??
systemOverlayStyle ??
actionsPadding) ==
null,
),
_backgroundColor = backgroundColor ?? color,
_foregroundColor = foregroundColor,
_elevation = elevation,
_scrolledUnderElevation = scrolledUnderElevation,
_shadowColor = shadowColor,
_surfaceTintColor = surfaceTintColor,
_shape = shape,
_iconTheme = iconTheme,
_actionsIconTheme = actionsIconTheme,
_centerTitle = centerTitle,
_titleSpacing = titleSpacing,
_leadingWidth = leadingWidth,
_toolbarHeight = toolbarHeight,
_toolbarTextStyle = toolbarTextStyle,
_titleTextStyle = titleTextStyle,
_systemOverlayStyle = systemOverlayStyle,
_actionsPadding = actionsPadding,
_data = data,
super(child: child ?? const SizedBox());