Injectzone class

Provides dependency injection and overriding using zones.

Constructors

Injectzone.new()
Create Injectzone const instance.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

inject<T>(T builder()) → T
Inject T dependency from builder function For example: final deviceInfo = Injectzone().inject(() => DeviceInfoPlugin());
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withInjected(Iterable<ValueInjector> values, dynamic callback()) → dynamic
Override T dependency with iterable ValueInjectors during callback execution For example: await Injectzone().withInjected( ValueInjector.inject<DeviceInfoPlugin>(deviceInfoPlugin), , () async { ... my test code });

Operators

operator ==(Object other) bool
The equality operator.
inherited