encodeNavigationBarThemeData static method
Encodes the given value
to a JSON representation.
{
"backgroundColor": <Color>,
"height": <double>,
"iconTheme": <MaterialStateProperty<IconThemeData>>,
"indicatorColor": <Color>,
"labelBehavior": <NavigationDestinationLabelBehavior>,
"labelTextStyle": <MaterialStateProperty<TextStyle>>,
"useIndicator": <bool>
}
See also:
Implementation
static Map<String, dynamic>? encodeNavigationBarThemeData(
NavigationBarThemeData? value,
) {
Map<String, dynamic>? result;
if (value != null) {
result = {
'backgroundColor': encodeColor(value.backgroundColor),
'height': value.height,
'iconTheme': encodeMaterialStatePropertyIconThemeData(
value.iconTheme,
),
'indicatorColor': encodeColor(value.indicatorColor),
'labelBehavior':
encodeNavigationDestinationLabelBehavior(value.labelBehavior),
'labelTextStyle': encodeMaterialStatePropertyTextStyle(
value.labelTextStyle,
),
};
}
return _stripNull(result);
}