TF-1861 Config and abstraction work manager

(cherry picked from commit ee2dca9b34a907c8356ceccf0b23efba2893a01c)
This commit is contained in:
dab246
2023-05-23 12:56:21 +07:00
committed by Dat Vu
parent 9f402b9ec1
commit b1af1d8533
15 changed files with 329 additions and 4 deletions
+1
View File
@@ -41,6 +41,7 @@ export 'utils/config/app_config_loader.dart';
export 'utils/config/app_config_parser.dart';
export 'utils/config/errors.dart';
export 'data/utils/compress_file_utils.dart';
export 'utils/platform_info.dart';
// Views
export 'presentation/views/text/slogan_builder.dart';
+14
View File
@@ -0,0 +1,14 @@
import 'dart:io';
import 'package:flutter/foundation.dart';
abstract class PlatformInfo {
static bool get isWeb => kIsWeb;
static bool get isLinux => !kIsWeb && Platform.isLinux;
static bool get isWindows => !kIsWeb && Platform.isWindows;
static bool get isMacOS => !kIsWeb && Platform.isMacOS;
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;
}