mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
profile page fix bugs
This commit is contained in:
27
lib/features/menu/model/time_zone_model.dart
Normal file
27
lib/features/menu/model/time_zone_model.dart
Normal file
@ -0,0 +1,27 @@
|
||||
class TimeZone {
|
||||
final String name;
|
||||
final String offset;
|
||||
final String id;
|
||||
|
||||
TimeZone({
|
||||
required this.name,
|
||||
required this.offset,
|
||||
required this.id,
|
||||
});
|
||||
|
||||
factory TimeZone.fromJson(Map<String, dynamic> json) {
|
||||
return TimeZone(
|
||||
name: json['cityName'],
|
||||
offset: json['timeZoneOffset'],
|
||||
id: json['uuid'].toString(), // Ensure id is a String
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'name': name,
|
||||
'offset': offset,
|
||||
'id': id,
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user