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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user