ensureInitialized static method

ElementsBinding ensureInitialized()

Returns an instance of the ElementsBinding, creating and initializing it if necessary. If one is created, it will be a ElementsFlutterBinding. If one was previously initialized, then it will at least implement ElementsBinding.

Implementation

static ElementsBinding ensureInitialized() {
  if (ElementsBinding.instance == null) ElementsFlutterBinding();
  return ElementsBinding.instance!;
}