How to find if we are running unit test in Dart (Flutter)
You can use the following to check if you're running a test.
Platform.environment.containsKey('FLUTTER_TEST')
You can use the following to check if you're running a test.
Platform.environment.containsKey('FLUTTER_TEST')