get<T> static method

T? get<T>({
  1. dynamic key,
  2. dynamic args,
  3. bool withInjector = true,
})

// // // Returns object of requested type by given key or by Type from ControlFactory. When args are not empty and object is Initializable, then Initializable.init is called. Set withInjector to re-inject stored object.

If object is not found in internal store, then factory tries to initialize new one via ControlFactory.init. When T is passed to initializer and args are null, then key is used as arguments for ControlFactory.init. And when initialized object is LazyControl then this object is stored into Factory.

Control provides static call for this function via Control.get.

nullable

Implementation

/// Returns object of requested type by given [key] or by [Type] from [ControlFactory].
/// When [args] are not empty and object is [Initializable], then [Initializable.init] is called.
/// Set [withInjector] to re-inject stored object.
///
/// If object is not found in internal store, then factory tries to initialize new one via [ControlFactory.init].
/// When [T] is passed to initializer and [args] are null, then [key] is used as arguments for [ControlFactory.init].
/// And when initialized object is [LazyControl] then this object is stored into Factory.
///
/// [Control] provides static call for this function via [Control.get].
///
/// nullable
static T? get<T>({dynamic key, dynamic args, bool withInjector = true}) =>
    factory.get<T>(key: key, args: args, withInjector: withInjector);