inFlutterTest property

bool get inFlutterTest

Indicate if running under a 'Flutter Test' environment

Implementation

// @Deprecated('Unreliable. Use inWidgetsFlutterBinding instead.')
bool get inFlutterTest =>
    _inFlutterTest ??= Platform.environment.containsKey('FLUTTER_TEST') ||
        WidgetsBinding.instance is! WidgetsFlutterBinding;