Skip to content

Commit

Permalink
Update KnowledgePanel columns as per server response (#355)
Browse files Browse the repository at this point in the history
Co-authored-by: Jasmeet Singh <[email protected]>
  • Loading branch information
jasmeet0817 and Jasmeet Singh authored Jan 7, 2022
1 parent f871db5 commit 3153c85
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
20 changes: 19 additions & 1 deletion lib/model/KnowledgePanelElement.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,28 @@ class KnowledgePanelTableRowElement extends JsonObject {
class KnowledgePanelTableColumn extends JsonObject {
final String text;

@JsonKey(name: 'text_for_small_screens')
final String? textForSmallScreens;

@JsonKey(name: 'shown_by_default')
final bool? showByDefault;

@JsonKey(name: 'column_group_id')
final String? columnGroupId;

final String? style;

@JsonKey(unknownEnumValue: KnowledgePanelColumnType.TEXT)
final KnowledgePanelColumnType? type;

const KnowledgePanelTableColumn({required this.text, required this.type});
const KnowledgePanelTableColumn({
required this.text,
required this.type,
this.textForSmallScreens,
this.showByDefault,
this.columnGroupId,
this.style,
});

factory KnowledgePanelTableColumn.fromJson(Map<String, dynamic> json) =>
_$KnowledgePanelTableColumnFromJson(json);
Expand Down
8 changes: 8 additions & 0 deletions lib/model/KnowledgePanelElement.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3153c85

Please sign in to comment.