MInviteEventState class abstract
Represents the state of invite events in a room.
The events
field represents a list of invite events in the room.
This class corresponds to the invite event state object defined in the Matrix API specification. For more details, refer to the API documentation at https://matrix.org/docs/spec/client_server/latest#invite-event-state.
To create an instance of InviteEventState
, use the provided factory constructors or the fromJson
method.
It is also possible to create an initial instance of InviteEventState
using the initial
factory constructor.
Example usage:
final inviteEventState = InviteEventState.fromJson(jsonData);
final inviteEvents = inviteEventState.events;
- Available extensions
- Annotations
-
- @Freezed(makeCollectionsUnmodifiable: false)
Constructors
-
MInviteEventState.new({@JsonKey(name: 'events') List<
MMessage?> ? events}) -
Creates an MInviteEventState instance.
factory
-
MInviteEventState.fromJson(Map<
String, dynamic> json) -
Creates an MInviteEventState instance from a JSON map.
factory
- MInviteEventState.initial()
-
Creates an initial MInviteEventState instance.
factory
Properties
-
copyWith
→ $MInviteEventStateCopyWith<
MInviteEventState> -
Create a copy of MInviteEventState
with the given fields replaced by the non-null parameter values.
no setterinherited
-
events
→ List<
MMessage?> ? -
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_MInviteEventState value)) → TResult -
Available on MInviteEventState, provided by the MInviteEventStatePatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_MInviteEventState value)?) → TResult? -
Available on MInviteEventState, provided by the MInviteEventStatePatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_MInviteEventState value)?, {required TResult orElse()}) → TResult -
Available on MInviteEventState, provided by the MInviteEventStatePatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(List< MMessage?> ? events)?, {required TResult orElse()}) → TResult -
Available on MInviteEventState, provided by the MInviteEventStatePatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this MInviteEventState to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(List< MMessage?> ? events)) → TResult -
Available on MInviteEventState, provided by the MInviteEventStatePatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(List< MMessage?> ? events)?) → TResult? -
Available on MInviteEventState, provided by the MInviteEventStatePatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited