Initial commit of Flutter project

This commit is contained in:
2025-09-19 11:30:38 +05:30
parent 1f0ec17edc
commit 4a9ae0a3b3
28 changed files with 2033 additions and 594 deletions

View File

@@ -0,0 +1,42 @@
import 'package:glowwheels/models/service_boy_response.dart';
import 'package:glowwheels/models/serviceboy_model.dart';
class ServiceBoyResponse {
final String id;
final String shopId;
final List<ServiceBoy> serviceBoy;
final String createdAt;
final String updatedAt;
ServiceBoyResponse({
required this.id,
required this.shopId,
required this.serviceBoy,
required this.createdAt,
required this.updatedAt,
});
factory ServiceBoyResponse.fromJson(Map<String, dynamic> json) {
return ServiceBoyResponse(
id: json['_id'],
shopId: json['shopId'],
serviceBoy: (json['serviceBoy'] as List)
.map((e) => ServiceBoy.fromJson(e))
.toList(),
createdAt: json['createdAt'],
updatedAt: json['updatedAt'],
);
}
Map<String, dynamic> toJson() {
return {
'_id': id,
'shopId': shopId,
'serviceBoy': serviceBoy.map((e) => e.toJson()).toList(),
'createdAt': createdAt,
'updatedAt': updatedAt,
};
}
}