GenericEvent class

A GenericEvent that is handled by the Generic server implementation rather than handling it differently in each game implementation

Implemented types
Implementers
Available Extensions
Annotations
  • @freezed

Constructors

GenericEvent.fromJson(Map<String, dynamic> map)
factory
GenericEvent.message(String message, {required PlayerID from, required PlayerID? to})
Sends a message from the player with id from to the player with id to
const
factory
GenericEvent.readyNextRound(String player)
Signals that player is ready for the next round
const
factory
GenericEvent.undo()
Undo's the effects of the last event
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The game type this event is handled by
no setteroverride

Methods

map<TResult extends Object?>({required TResult undo(GenericEventUndo value), required TResult readyNextRound(_GenericReadyNextRoundEvent value), required TResult message(GameMessage value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult undo(GenericEventUndo value)?, TResult readyNextRound(_GenericReadyNextRoundEvent value)?, TResult message(GameMessage value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult undo(GenericEventUndo value)?, TResult readyNextRound(_GenericReadyNextRoundEvent value)?, TResult message(GameMessage value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult undo()?, TResult readyNextRound(String player)?, TResult message(String message, String from, String? to)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult undo(), required TResult readyNextRound(String player), required TResult message(String message, String from, String? to)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult undo()?, TResult readyNextRound(String player)?, TResult message(String message, String from, String? to)?}) → TResult?
inherited

Operators

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