Skip to content

Commit

Permalink
tweak data format
Browse files Browse the repository at this point in the history
  • Loading branch information
j7126 committed Feb 20, 2024
1 parent 7911e4c commit 67c9b36
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 105 deletions.
89 changes: 0 additions & 89 deletions data/all_cards.example.json

This file was deleted.

2 changes: 2 additions & 0 deletions data/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

a subset of mtgjson AllPrintings

Generated by https://github.com/j7126/mtgjson_converter_dart

### set_list.json

mtgjson SetList
21 changes: 5 additions & 16 deletions lib/mtgjson/dataModel/card_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,17 @@ class CardSet {
required this.setCode,
required this.identifiers,
required this.artist,
}) {
cardSearchString = filterStringForSearch(name);
cardSearchStringWords = cardSearchString.split(' ');
}
required this.cardSearchString,
required this.cardSearchStringWords,
});

String name;
String uuid;
String setCode;
String? artist;
Identifiers identifiers;

@JsonKey(
includeFromJson: false,
includeToJson: false,
)
late String cardSearchString;

@JsonKey(
includeFromJson: false,
includeToJson: false,
)
late List<String> cardSearchStringWords;
String cardSearchString;
List<String> cardSearchStringWords;

factory CardSet.fromJson(Map<String, dynamic> json) => _$CardSetFromJson(json);

Expand Down
6 changes: 6 additions & 0 deletions lib/mtgjson/dataModel/card_set.g.dart

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

0 comments on commit 67c9b36

Please sign in to comment.