initInstances method Null safety

  1. @override
void initInstances()

The initialization method. Subclasses override this method to hook into the platform and otherwise configure their services. Subclasses must call "super.initInstances()".

By convention, if the service is to be provided as a singleton, it should be exposed as MixinClassName.instance, a static getter that returns MixinClassName._instance, a static field that is set by initInstances().


void initInstances() {
  timeDilation = 1.0; // just in case the developer has artificially changed it for development
  if (overrideHttpClient) {
  _testTextInput = TestTextInput(onCleared: _resetFocusedEditable);