forked from Nexus/nexus
add and render HistoryVisibilityContent
This commit is contained in:
parent
ec64a81fed
commit
70eba46c76
3 changed files with 47 additions and 0 deletions
19
lib/models/content/history_visibility.dart
Normal file
19
lib/models/content/history_visibility.dart
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/content/content.dart";
|
||||
part "history_visibility.freezed.dart";
|
||||
part "history_visibility.g.dart";
|
||||
|
||||
@freezed
|
||||
abstract class HistoryVisibilityContent extends Content
|
||||
with _$HistoryVisibilityContent {
|
||||
HistoryVisibilityContent._();
|
||||
factory HistoryVisibilityContent({
|
||||
required HistoryVisibility historyVisibility,
|
||||
}) = _HistoryVisibilityContent;
|
||||
|
||||
factory HistoryVisibilityContent.fromJson(Map<String, Object?> json) =>
|
||||
_$HistoryVisibilityContentFromJson(json);
|
||||
}
|
||||
|
||||
@JsonEnum(fieldRename: FieldRename.snake)
|
||||
enum HistoryVisibility { invited, joined, shared, worldReadable }
|
||||
Loading…
Add table
Add a link
Reference in a new issue