SleepInfo.fromJson constructor

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

Implementation

factory SleepInfo.fromJson(Map<String, dynamic> json) => SleepInfo(
      totalTime: json["totalTime"],
      restfulTime: json["restfulTime"],
      lightTime: json["lightTime"],
      soberTime: json["soberTime"],
      remTime: json["remTime"],
      details: List<DetailBean>.from((json["details"] ?? []).map((e) => DetailBean.fromJson(e))),
    );