encodeNavigationRailThemeData static method
Encodes the given value
to a JSON representation.
{
"backgroundColor": <Color>,
"elevation": <double>,
"groupAlignment": <double>,
"labelType": <NavigationRailLabelType>,
"selectedIconTheme": <IconThemeData>,
"selectedLabelTextStyle": <TextStyle>,
"unselectedIconTheme": <IconThemeData>,
"unselectedLabelTextStyle": <TextStyle>
}
See also:
Implementation
static Map<String, dynamic>? encodeNavigationRailThemeData(
NavigationRailThemeData? value,
) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'backgroundColor': encodeColor(value.backgroundColor),
'elevation': value.elevation,
'groupAlignment': value.groupAlignment,
'labelType': encodeNavigationRailLabelType(value.labelType),
'selectedIconTheme': encodeIconThemeData(value.selectedIconTheme),
'selectedLabelTextStyle': encodeTextStyle(
value.selectedLabelTextStyle,
),
'unselectedIconTheme': encodeIconThemeData(value.unselectedIconTheme),
'unselectedLabelTextStyle': encodeTextStyle(
value.unselectedLabelTextStyle,
),
};
}
return _stripNull(result);
}