parseSearchViewTheme function
Implementation
SearchViewThemeData? parseSearchViewTheme(
ThemeData theme, Map<String, dynamic>? j) {
if (j == null) {
return null;
}
TextStyle? parseTextStyle(String propName) {
return j[propName] != null ? textStyleFromJson(theme, j[propName]) : null;
}
return theme.searchViewTheme.copyWith(
backgroundColor: parseColor(theme, j["bgcolor"]),
surfaceTintColor: parseColor(theme, j["surface_tint_color"]),
dividerColor: parseColor(theme, j["divider_color"]),
elevation: parseDouble(j["elevation"]),
headerHintStyle: parseTextStyle("header_hint_text_style"),
headerTextStyle: parseTextStyle("header_text_style"),
shape: j["shape"] != null ? outlinedBorderFromJSON(j["shape"]) : null,
side: borderSideFromJSON(theme, j["border_side"]),
constraints: boxConstraintsFromJSON(j["size_constraints"]),
headerHeight: parseDouble(j["header_height"]),
);
}