BlocEventType<T> class

Every BlocEvent has corresponding BlocEventType. This specifies the type of the bloc event as well as differentiating it from other events.

Also contains metadata such as userInitiated that gives extra information as to the circumstances of the this event type.

When comparing equality, only the eventName is taken into account.

Constructors

BlocEventType(String eventName, {bool userInitiated = true})
eventName is a unique identifier for this event type. This needs to be fairly unique.
const
BlocEventType.fromObject(Object eventType, {bool userInitiated = true})
Uses eventTypes Object.toString method to create the eventName
const

Properties

asNotUserInitiated BlocEventType<T>
Returns this value if already not userInitiated. Otherwise will copy this event type with userInitiated set to false.
no setter
asUserInitiated BlocEventType<T>
Returns this value if already userInitiated. Otherwise will copy this event type with userInitiated set to true.
no setter
eventName String
Unique identifier for this event type. This needs to be fairly unique.
final
hashCode int
The hash code for this object.
no setterinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
userInitiated bool
Indicates whether the action was fired because of a specific action taken by the user or if it was fired automatically because of some other means.
final

Methods

copyWith({String? eventName, bool? userInitiated}) BlocEventType<T>
Creates a new copy of this event type with the specified values.
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