class StaffResponse { final String status; final List data; StaffResponse({required this.status, required this.data}); factory StaffResponse.fromJson(Map json) { return StaffResponse( status: json['status'] ?? '', data: (json['data'] as List) .map((item) => StaffModel.fromJson(item)) .toList(), ); } } class StaffModel { final int id; final String name; final String mobile; final String email; final int status; final int generalChat; final int createService; StaffModel({ required this.id, required this.name, required this.mobile, required this.email, required this.status, required this.generalChat, required this.createService, }); factory StaffModel.fromJson(Map json) { return StaffModel( id: json['id'] ?? 0, name: json['name'] ?? '', mobile: json['mobile'] ?? '', email: json['email'] ?? '', status: json['status'] ?? 0, generalChat: json['general_chat'] ?? 0, createService: json['create_service'] ?? 0, ); } }