get<T extends Object> method

T get<T extends Object>({
  1. String? instanceName,
  2. dynamic param1,
  3. dynamic param2,
})

this is an ugly hack so that you don't get a warning in the statefulwidget all the following functions can be called inside the build function but also the mixin takes care that everything is correctly disposed. retrieves or creates an instance of a registered type t depending on the registration function used for this type or based on a name. for factories you can pass up to 2 parameters param1,param2 they have to match the types given at registration with registerfactoryparam()

Implementation

/// retrieves or creates an instance of a registered type [t] depending on the registration
/// function used for this type or based on a name.
/// for factories you can pass up to 2 parameters [param1,param2] they have to match the types
/// given at registration with [registerfactoryparam()]
T get<T extends Object>(
        {String? instanceName, dynamic param1, dynamic param2}) =>
    GetIt.I<T>(instanceName: instanceName, param1: param1, param2: param2);