Skip to content

Commit

Permalink
config: introduce class for getting runtime args
Browse files Browse the repository at this point in the history
  • Loading branch information
octobocto committed Oct 27, 2023
1 parent 8bbe1bf commit f47cd12
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/config/runtime_args.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'dart:io';

// A class where you should put runtime arguments
abstract class RuntimeArgs {
static bool get isInTest =>
Platform.environment.containsKey('FLUTTER_TEST') || const String.fromEnvironment('FLUTTER_TEST').isNotEmpty;
}

0 comments on commit f47cd12

Please sign in to comment.