encodeBottomNavigationBarThemeData static method
Encodes the given BottomNavigationBarThemeData to a JSON compatible map.
{
"backgroundColor": "<Color>",
"elevation": "<double>",
"landscapeLayout": "<BottomNavigationBarLandscapeLayout>",
"selectedIconTheme": "<IconThemeData>",
"selectedIconColor": "<Color>",
"selectedLabelStyle": "<TextStyle>",
"showSelectedLabels": "<bool>",
"showUnselectedLabels": "<bool>",
"type": "<BottomNavigationBarType>",
"unselectedIconTheme": "<IconThemeData>",
"unselectedItemColor": "<Color>",
"unselectedLabelStyle": "<TextStyle>",
}
See also:
Implementation
static Map<String, dynamic>? encodeBottomNavigationBarThemeData(
BottomNavigationBarThemeData? value,
) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'backgroundColor': encodeColor(value.backgroundColor),
'elevation': value.elevation,
'landscapeLayout': encodeBottomNavigationBarLandscapeLayout(
value.landscapeLayout,
),
'selectedIconTheme': encodeIconThemeData(value.selectedIconTheme),
'selectedItemColor': encodeColor(value.selectedItemColor),
'selectedLabelStyle': encodeTextStyle(value.selectedLabelStyle),
'showSelectedLabels': value.showSelectedLabels,
'showUnselectedLabels': value.showUnselectedLabels,
'type': encodeBottomNavigationBarType(value.type),
'unselectedIconTheme': encodeIconThemeData(value.unselectedIconTheme),
'unselectedItemColor': encodeColor(value.unselectedItemColor),
'unselectedLabelStyle': encodeTextStyle(value.unselectedLabelStyle),
};
}
return _stripNull(result);
}