Services class
A dependency injection service that manages the lifecycle of other services.
All services must only be used by accessing them from this class, and this class will take care of calling lifecycle methods like init while handling possibly asynchrony.
When adding a new service, declare it as a field in this class and add it to the init and dispose methods. Otherwise, the service will fail to initialize and dispose properly.
To get an instance of this class, use services.
Constructors
- Services()
Properties
- error ↔ String?
-
The first error that occurred during startup.
getter/setter pair
- files → FilesService
-
A service that reads and writes to device files.
final
- gamepad → GamepadService
-
A service that handles controller inputs.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → Future< void> - Cleans up any resources used by the service.
-
init(
) → Future< void> - Initializes the service.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited