GameHighScore class abstract
This object represents one row of the high scores table for a game.
- Available extensions
- Annotations
-
- @freezed
Constructors
- GameHighScore({@JsonKey.new(name: 'position') required int position, @JsonKey.new(name: 'user') required User user, @JsonKey.new(name: 'score') required int score})
-
Constructs a GameHighScore object
constfactory
-
GameHighScore.fromJson(Map<
String, dynamic> json) -
De-serializes a GameHighScore object from a JSON map
factory
Properties
-
copyWith
→ $GameHighScoreCopyWith<
GameHighScore> -
Create a copy of GameHighScore
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- position → int
-
Position in high score table for the game
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- score → int
-
Score
no setterinherited
- user → User
-
User
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_GameHighScore value)) → TResult -
Available on GameHighScore, provided by the GameHighScorePatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_GameHighScore value)?) → TResult? -
Available on GameHighScore, provided by the GameHighScorePatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_GameHighScore value)?, {required TResult orElse()}) → TResult -
Available on GameHighScore, provided by the GameHighScorePatterns extension
A variant ofmapthat fallback to returningorElse. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this GameHighScore to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited