BusinessOpeningHours.fromJson constructor

BusinessOpeningHours.fromJson(
  1. Map<String, dynamic> json
)

Creates a BusinessOpeningHours object from a JSON map.

Implementation

factory BusinessOpeningHours.fromJson(Map<String, dynamic> json) {
  return BusinessOpeningHours(
    timeZoneName: json['time_zone_name'],
    openingHours: (json['opening_hours'] as List<dynamic>)
        .map((e) => BusinessOpeningHoursInterval.fromJson(e))
        .toList(),
  );
}