TF-2384 Store data to keychain when save new Account

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit 4d84a3354927d1c0becaf0e8e6d7cc8c54721f58)
This commit is contained in:
dab246
2023-12-24 19:24:33 +07:00
committed by Dat H. Pham
parent 940cc2f315
commit a2a1f8246f
22 changed files with 211 additions and 238 deletions
+23
View File
@@ -1,5 +1,6 @@
import 'dart:io';
import 'package:core/utils/app_logger.dart';
import 'package:flutter/foundation.dart';
abstract class PlatformInfo {
@@ -7,8 +8,30 @@ abstract class PlatformInfo {
static bool get isLinux => !kIsWeb && Platform.isLinux;
static bool get isWindows => !kIsWeb && Platform.isWindows;
static bool get isMacOS => !kIsWeb && Platform.isMacOS;
static bool get isFuchsia => !kIsWeb && Platform.isFuchsia;
static bool get isIOS => !kIsWeb && Platform.isIOS;
static bool get isAndroid => !kIsWeb && Platform.isAndroid;
static bool get isMobile => isAndroid || isIOS;
static bool get isDesktop => isLinux || isWindows || isMacOS;
static String get platformNameOS {
var platformName = '';
if (isWeb) {
platformName = 'Web';
} else if (isAndroid) {
platformName = 'Android';
} else if (isIOS) {
platformName = 'IOS';
} else if (isFuchsia) {
platformName = 'Fuchsia';
} else if (isLinux) {
platformName = 'Linux';
} else if (isMacOS) {
platformName = 'MacOS';
} else if (isWindows) {
platformName = 'Windows';
}
log('PlatformInfo::platformNameOS(): $platformName');
return platformName;
}
}