(WIP) Add network test

- Network tested
 - Some UI updates
This commit is contained in:
2026-04-13 20:00:38 +03:00
parent 210b59f8ed
commit c375eca7b8
7 changed files with 137 additions and 7 deletions

View File

@@ -0,0 +1,29 @@
// shared/lib/models/message.dart
import 'dart:convert';
class Message {
final String chatId;
final String msg;
Message({required this.chatId, required this.msg});
Map<String, dynamic> toMap() {
return {
'chat_id': chatId,
'msg': msg,
};
}
factory Message.fromMap(Map<String, dynamic> map) {
return Message(
chatId: map['chat_id'] ?? '',
msg: map['msg'] ?? '',
);
}
String toJson() => json.encode(toMap());
factory Message.fromJson(String source) => Message.fromMap(json.decode(source));
}