ServiceWrapper<B extends _BaseService> class

It assigns the service entered as the default service (unless re-wrapped) in all contexts under the context in which it was created.

Example:

  ServiceWrapper<Crypto>(
    service: MyCryptoService(),
    child: MyChild()
  )
Inheritance

Constructors

ServiceWrapper({required B service, required Component child})
Annotate with service type

Properties

child → Component
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
service → B
Available Services:
final

Methods

build(BuildContext context) → Component
override
createBinding() → StatelessBinding
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
toStringDeep() → String
inherited
toStringSort() → String
inherited

Operators

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