ensureInitialized method Null safety
Creates and initializes the binding. This function is idempotent; calling it a second time will just return the previously-created instance.
This function will use AutomatedTestWidgetsFlutterBinding if
the test was run using
flutter test, and
LiveTestWidgetsFlutterBinding otherwise (e.g. if it was run
flutter run). This is determined by looking at the
environment variables for a variable called
FLUTTER_TEST is set with a value of 'true', then this test was
flutter test. If
FLUTTER_TEST is not set, or if it is set
to 'false', then this test was invoked by
environment is exposed to test different environment
variable values, and should not be used.
static WidgetsBinding ensureInitialized([@visibleForTesting Map<String, String>? environment]) => binding.ensureInitialized(environment);