kIsTest top-level constant

bool const kIsTest

A value to check if this is running in a test environment. Defined by setting the dart define IS_TEST to true

Example: flutter test --dart-define=IS_TEST=true

Implementation

const bool kIsTest = bool.fromEnvironment('IS_TEST', defaultValue: false);