TF-1899 Store session as string to hive

(cherry picked from commit 2f570681d32b5b234f60f9e4d7f13e69a5bb2b31)
This commit is contained in:
dab246
2023-06-07 00:30:05 +07:00
committed by Dat Vu
parent dc07e5661e
commit 2377225520
3 changed files with 9 additions and 5 deletions
@@ -1,4 +1,6 @@
import 'dart:convert';
import 'package:core/presentation/extensions/uri_extension.dart';
import 'package:jmap_dart_client/http/converter/state_converter.dart';
import 'package:jmap_dart_client/http/converter/user_name_converter.dart';
@@ -32,7 +34,7 @@ extension SessionExtensions on Session {
return val;
}
SessionHiveObj toHiveObj() => SessionHiveObj(values: toJson());
SessionHiveObj toHiveObj() => SessionHiveObj(value: jsonEncode(toJson()));
String getQualifiedApiUrl({String? baseUrl}) {
if (baseUrl != null) {