generate method
dynamic
generate(
- dynamic theme
)
override
Implementation
@override
generate(dynamic theme) {
if (theme == null) {
if (style != null) {
return AppBarTheme(
backgroundColor: style!.background,
shape: style!.shape(),
elevation: style!.elevation,
foregroundColor: style!.foreground,
shadowColor: style!.shadow,
);
} else {
return null;
}
} else {
if (style != null) {
return (theme as AppBarTheme).copyWith(
backgroundColor: style!.background ?? theme.backgroundColor,
shape: style!.shape() ?? theme.shape,
elevation: style!.elevation ?? theme.elevation,
foregroundColor: style!.foreground ?? theme.foregroundColor,
shadowColor: style!.shadow ?? theme.shadowColor,
);
} else {
return theme as AppBarTheme;
}
}
}