SleepBean.fromJson constructor

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

Implementation

factory SleepBean.fromJson(Map<String, dynamic> json) => SleepBean(
      type: json["type"],
      sleepInfo: SleepInfo.fromJson(json["sleepInfo"] ?? {}),
      historySleep: HistorySleepBean.fromJson(json["historySleep"] ?? {}),
      goalSleepTime: json["goalSleepTime"] ?? -1,
    );