class MonthlyDataModel { int day; int totalDuration; MonthlyDataModel({required this.day, required this.totalDuration}); factory MonthlyDataModel.fromJson(Map json) => MonthlyDataModel( day: int.parse(json['day'].toString().split('-')[2]), totalDuration: int.parse(json['total_duration'].toString().split(':')[0])); }