Add Environment service with platform, build mode, and app info support
This commit is contained in:
27
finlog_app/fluttery/lib/environment.dart
Normal file
27
finlog_app/fluttery/lib/environment.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:fluttery/fluttery.dart';
|
||||
|
||||
/// Abstract Environment contract
|
||||
abstract class Environment extends Service {
|
||||
/// Platform checks
|
||||
bool get isAndroid;
|
||||
|
||||
bool get isIOS;
|
||||
|
||||
/// Build mode
|
||||
bool get isDebug;
|
||||
|
||||
bool get isRelease;
|
||||
|
||||
bool get isProfile;
|
||||
|
||||
/// App info
|
||||
Future<void> loadPackageInfo();
|
||||
|
||||
String get appName;
|
||||
|
||||
String get packageName;
|
||||
|
||||
String get version;
|
||||
|
||||
String get buildNumber;
|
||||
}
|
||||
Reference in New Issue
Block a user