StreakEngine.fromJson constructor

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

Implementation

StreakEngine.fromJson(Map<String, dynamic> json) {
  Iterable<dynamic> iterable = json['sessions'];
  for (var element in iterable) {
    Map<String, dynamic> el = element as Map<String, dynamic>;
    PracticeSession session = PracticeSession.fromJson(el);
    _sessions.add(session);
  }
}