ensureInitialized method

WidgetsBinding ensureInitialized()

Returns an instance of the binding that implements WidgetsBinding. If no binding has yet been initialized, the WidgetsFlutterBinding class is used to create and initialize one. You only need to call this method if you need the binding to be initialized before calling runApp.

Implementation

WidgetsBinding ensureInitialized() =>
    WidgetsFlutterBinding.ensureInitialized();