-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(worldstate): add kinepage model
- Loading branch information
1 parent
4f137d1
commit 0711415
Showing
5 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:warframestat_client/src/enums.dart'; | ||
|
||
part 'kinepage.g.dart'; | ||
|
||
/// {@template kinepage} | ||
/// Data class for kinepage | ||
/// {@endtemplate} | ||
@JsonSerializable() | ||
class Kinepage { | ||
/// {@macro kinepage} | ||
Kinepage({ | ||
required this.timestamp, | ||
required this.message, | ||
required this.translations, | ||
}); | ||
|
||
/// Creates a [Kinepage] instance from a json map | ||
factory Kinepage.fromJson(Map<String, dynamic> json) { | ||
return _$KinepageFromJson(json); | ||
} | ||
|
||
/// The date the message was sent | ||
final DateTime timestamp; | ||
|
||
/// The message itself | ||
final String message; | ||
|
||
/// The message in different translations | ||
final Map<Language, String> translations; | ||
|
||
/// Returns a map from [Kinepage] | ||
Map<String, dynamic> toJson() => _$KinepageToJson(this); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.