BindingBase constructor Null safety

BindingBase()

Default abstract constructor for bindings.

First calls initInstances to have bindings initialize their instance pointers and other state, then calls initServiceExtensions to have bindings initialize their observatory service extensions, if any.

Implementation

BindingBase() {
  developer.Timeline.startSync('Framework initialization');
  assert(() {
    _debugConstructed = true;
    return true;
  }());

  assert(_debugInitializedType == null);
  initInstances();
  assert(_debugInitializedType != null);

  assert(!_debugServiceExtensionsRegistered);
  initServiceExtensions();
  assert(_debugServiceExtensionsRegistered);

  developer.postEvent('Flutter.FrameworkInitialization', <String, String>{});

  developer.Timeline.finishSync();
}