mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 04:07:55 +00:00
profile page fix bugs
This commit is contained in:
@@ -7,8 +7,8 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/profile_event.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/profile_state.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/region_model.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/time_zone_model.dart';
|
||||
import 'package:syncrow_app/features/menu/model/region_model.dart';
|
||||
import 'package:syncrow_app/features/menu/model/time_zone_model.dart';
|
||||
import 'package:syncrow_app/services/api/profile_api.dart';
|
||||
import 'package:syncrow_app/utils/helpers/snack_bar.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/region_model.dart';
|
||||
import 'package:syncrow_app/features/menu/bloc/profile_bloc/time_zone_model.dart';
|
||||
import 'package:syncrow_app/features/menu/model/region_model.dart';
|
||||
import 'package:syncrow_app/features/menu/model/time_zone_model.dart';
|
||||
|
||||
class ProfileState extends Equatable {
|
||||
const ProfileState();
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
|
||||
|
||||
class RegionModel {
|
||||
final String name;
|
||||
final String id;
|
||||
|
||||
RegionModel({
|
||||
required this.name,
|
||||
required this.id,
|
||||
});
|
||||
|
||||
factory RegionModel.fromJson(Map<String, dynamic> json) {
|
||||
return RegionModel(
|
||||
name: json['regionName'],
|
||||
id: json['uuid'].toString(), // Ensure id is a String
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'regionName': name,
|
||||
'uuid': id,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
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