parseNavigationBarTheme function
Implementation
NavigationBarThemeData? parseNavigationBarTheme(
ThemeData theme, Map<String, dynamic>? j) {
if (j == null) {
return null;
}
return theme.navigationBarTheme.copyWith(
backgroundColor: parseColor(theme, j["bgcolor"]),
shadowColor: parseColor(theme, j["shadow_color"]),
surfaceTintColor: parseColor(theme, j["surface_tint_color"]),
indicatorColor: parseColor(theme, j["indicator_color"]),
overlayColor: getWidgetStateProperty<Color?>(
j["overlay_color"], (jv) => parseColor(theme, jv as String)),
elevation: parseDouble(j["elevation"]),
height: parseDouble(j["height"]),
labelTextStyle: getWidgetStateProperty<TextStyle?>(
j["label_text_style"], (jv) => textStyleFromJson(theme, jv)),
indicatorShape: j["indicator_shape"] != null
? outlinedBorderFromJSON(j["indicator_shape"])
: null,
labelBehavior: j["label_behavior"] != null
? NavigationDestinationLabelBehavior.values.firstWhereOrNull(
(c) => c.name.toLowerCase() == j["label_behavior"].toLowerCase())
: null,
);
}