encodeAppBarTheme static method
Encodes the given value
to a JSON representation.
{
"actionsIconTheme": "<IconThemeData>",
"backgroundColor": "<Color>",
"centerTitle": "<bool>",
"elevation": "<double>",
"foregroundColor": "<Color>",
"iconTheme": "<IconThemeData>",
"scrolledUnderElevation": "<double>",
"shadowColor": "<Color>",
"surfaceTintColor": "<Color>",
"systemOverlayStyle": "<SystemUiOverlayStyle>",
"titleSpacing": "<double>",
"titleTextStyle": "<TextStyle>",
"toolbarHeight": "<double>",
"toolbarTextStyle": "<TextStyle>"
}
See also:
- encodeBrightness
- encodeColor
- encodeIconThemeData
- encodeSystemUiOverlayStyle
encodeToolbarTextStyle
Implementation
static Map<String, dynamic>? encodeAppBarTheme(AppBarTheme? value) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'actionsIconTheme': encodeIconThemeData(value.actionsIconTheme),
'backgroundColor': encodeColor(value.backgroundColor),
'centerTitle': value.centerTitle,
'elevation': value.elevation,
'foregroundColor': encodeColor(value.foregroundColor),
'iconTheme': encodeIconThemeData(value.iconTheme),
'scrolledUnderElevation': value.scrolledUnderElevation,
'shadowColor': encodeColor(value.shadowColor),
'surfaceTintColor': encodeColor(value.surfaceTintColor),
'systemOverlayStyle': encodeSystemUiOverlayStyle(
value.systemOverlayStyle,
),
'titleSpacing': value.titleSpacing,
'titleTextStyle': encodeTextStyle(value.titleTextStyle),
'toolbarHeight': value.toolbarHeight,
'toolbarTextStyle': encodeTextStyle(value.toolbarTextStyle),
};
}
return _stripDynamicNull(result);
}