GitsCubit<T> class abstract

A GitsCubit is abstract class with extend Cubit purpose to make clean state management combine with GitsStatePage

Inheritance

Constructors

GitsCubit(T initialState)

Properties

context BuildContext?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isClosed bool
Whether the bloc is closed.
no setterinherited
mounted bool
Used to check if the widget is mounted or not.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → T
The current state.
no setterinherited
stream Stream<T>
The current stream of states.
no setterinherited

Methods

addError(Object error, [StackTrace? stackTrace]) → void
Reports an error which triggers onError with an optional StackTrace.
inherited
blocListeners(BuildContext context) List<BlocListener<StateStreamable, dynamic>>
Called when a GitsStatePage is build with MultiBlocListener.
blocProviders(BuildContext context) List<BlocProvider<StateStreamableSource<Object?>>>
Called when a GitsStatePage is build with MultiBlocProvider.
close() Future<void>
Closes the instance. This method should be called when the instance is no longer needed. Once close is called, the instance can no longer be used.
override
didChangeDependencies(BuildContext context) → void
Called when a dependency of this State object changes.
didUpdateWidget<Page>(BuildContext context, Page oldWidget, Page widget) → void
Called whenever the widget configuration changes.
dispose() → void
Called when this object is closes the instance.
emit(T state) → void
Updates the state to the provided state. emit does nothing if the state being emitted is equal to the current state.
inherited
initAfterFirstLayout(BuildContext context) → void
Called when this after the first time frame has been displayed.
initArgument<Page>(BuildContext context, Page widget) → void
Called when after the first time frame has been displayed for initial the current configuration.
initState(BuildContext context) → void
Called when this object is inserted into the tree.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChange(Change<T> change) → void
Called whenever a change occurs with the given change. A change occurs when a new state is emitted. onChange is called before the state of the cubit is updated. onChange is a great spot to add logging/analytics for a specific cubit.
inherited
onError(Object error, StackTrace stackTrace) → void
Called whenever an error occurs and notifies BlocObserver.onError.
inherited
toString() String
A string representation of this object.
inherited

Operators

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