getbloc library Null safety

Classes

BaseController<State>
An interface for the core functionality implemented by both Controller and StateController.
Controller<Event, State>
ListenerWidget
The ListenerWidget is a Listener Widget of the Controller's State.
ObserverController
An interface for observing the behavior of Controller instances.
StateBase<State>
An interface that extends all functionalities of GetxController and implemented by BaseController.
StateChange<State>
A StateChange represents the change from one State to another. A StateChange consists of the currentState and nextState.
StateController<State>
A StateController is similar to Controller but has no notion of events and relies on methods to emit new states. [...]
TransformController<Event, State>
A TransformController is the change from one state to another. Consists of the currentState, an event, and the nextState.

Functions

internalControllerTest<C extends BaseController<State>, State>({required C build(), State seed()?, dynamic act(C controller)?, Duration? wait, int skip = 0, dynamic expect()?, dynamic verify(C controller)?, dynamic errors()?}) Future<void>
Internal testController runner which is only visible for testing. This should never be used directly -- please use testController instead.
testController<C extends BaseController<State>, State>(String description, {required C build(), State seed()?, dynamic act(C controller)?, Duration? wait, int skip = 0, dynamic expect()?, dynamic verify(C controller)?, dynamic errors()?}) → void
Creates a new controller-specific test case with the given description. testController will handle asserting that the controller emits the expected states (in order) after act is executed. testController also handles ensuring that no additional states are emitted by closing the controller stream before evaluating the expectation. [...]

Typedefs

ListenerCallback = void Function(dynamic state)
TransitionFunction<Event, State> = Stream<TransformController<Event, State>> Function(Event)
Signature for a mapper function which takes an Event as input and outputs a Stream of TransformController objects.

Exceptions / Errors

ControllerUnhandledErrorException
Exception thrown when an unhandled error occurs within a controller. [...]