+ChangeNotifier Fixes

+Signout Fixes
+
This commit is contained in:
2025-04-06 18:23:35 +01:00
parent 13042f8133
commit d4fc16e412
18 changed files with 375 additions and 597 deletions
+18 -18
View File
@@ -3,28 +3,28 @@ import 'dart:convert';
class Details {
String name;
String image;
String email;
int unseenCount;
String? lastMessage;
DateTime? timeStamp;
String? type;
Details({
required this.name,
required this.image,
required this.lastMessage,
required this.timeStamp,
required this.unseenCount,
required this.type
});
Details(
{required this.name,
required this.image,
required this.email,
required this.lastMessage,
required this.timeStamp,
required this.unseenCount,
required this.type});
factory Details.fromData(String _details) {
return Details(
name: json.decode(_details)['name'],
image: json.decode(_details)['image'],
lastMessage: json.decode(_details)['lastMessage'],
timeStamp: DateTime.parse(json.decode(_details)['timeStamp'] ?? ""),
unseenCount: json.decode(_details)['unseenCount'],
type: json.decode(_details)['type'],
);
}
factory Details.fromData(String _details) => Details(
email: json.decode(_details)['email'],
name: json.decode(_details)['name'],
image: json.decode(_details)['image'],
lastMessage: json.decode(_details)['lastMessage'] ?? "",
timeStamp: DateTime.parse(json.decode(_details)['timeStamp']),
unseenCount: json.decode(_details)['unseenCount'],
type: json.decode(_details)['type'] ?? "",
);
}