Service providers are designed to improve the separation of your modules by delegating the initialization and registration of their respective events, commands (and more) within their own context.
Proposal
final class FooProvider extends ProviderContract {
FutureOr<void> boot() {
// Called when provider was loaded by the framework
}
FutureOr<void> ready() {
// Called when provider was ready to use
}
FutureOr<void> dispose() {
// Called when provider was unloaded
}
}
Overview
Service providers are designed to improve the separation of your modules by delegating the initialization and registration of their respective events, commands (and more) within their own context.
Proposal