register method
Registers object to lifecycle of State.
Widget with State must be initialized before executing this function - check isInitialized. It's safe to register objects in/after onInit function.
Implementation
@protected
void register(Disposable? object) {
assert(isInitialized);
holder.state?.register(object);
}