cwtch-ui/lib/config.dart

18 lines
710 B
Dart
Raw Permalink Normal View History

2021-06-24 23:10:45 +00:00
const dev_version = "development";
class EnvironmentConfig {
static const BUILD_VER = String.fromEnvironment('BUILD_VER', defaultValue: dev_version);
static const BUILD_DATE = String.fromEnvironment('BUILD_DATE', defaultValue: "now");
// set by the automated testing harness to circumvent untestable behaviours
// for example:
// * MessageRow: always show "reply" button (because can't test onHover or swipe)
static const TEST_MODE = String.fromEnvironment('TEST_MODE', defaultValue: "false") == "true";
2021-06-25 05:30:46 +00:00
static void debugLog(String log) {
if (EnvironmentConfig.BUILD_VER == dev_version) {
2023-03-20 20:13:31 +00:00
String datetime = DateTime.now().toIso8601String();
print("$datetime $log");
2021-06-25 05:30:46 +00:00
}
}
2021-06-24 23:10:45 +00:00
}