Files
tripz/lib/models/model/driver/rides_summary_model.dart
Hamza-Ayed e3a63e18fc 1/1/1
2024-01-01 00:56:25 +03:00

13 lines
385 B
Dart

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