fromJson static method
Implementation
// ignore: prefer_constructors_over_static_methods
static MenuData fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return MenuData(
name: mapValueOfType<String>(json, r'name') ?? '',
siteMenuItems:
MenuItem.listFromJson(json[r'siteMenuItems']) ?? <MenuItem>[],
);
}
throw Exception('menu data value is not a map');
}