Deck class
Classe que gerencia um baralho completo de Flashcards
- Annotations
- @JsonSerializable(explicitToJson: true)
Constructors
- Deck(String deckName, {FlashcardList deck, int qtdFlashcards})
- Método construtor
-
Deck.fromJson(Map<
String, dynamic> json) -
factory
Properties
- deck ↔ FlashcardList
-
O baralho
@JsonKey(required: true, disallowNullValue: true), read / write
- deckCopy ↔ FlashcardList
-
Uma cópia do baralho
@JsonKey(required: false, disallowNullValue: true), read / write
- deckName ↔ String
-
Nome do baralho
@JsonKey(required: true, disallowNullValue: true), read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- qtdFlashcards ↔ int
-
Quantidade de Flashcards no baralho
@JsonKey(required: true, disallowNullValue: true), read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
checkContains(
Flashcard card) → bool - Valida se há uma cópia identica do Flashcard card dentro do deck
-
getCopy(
) → FlashcardList - Retorna uma copia do deck
-
getName(
) → String - Retorna o nome do baralho
-
getQtd(
) → int - Retorna o tamanho do baralho
-
insertCard(
Flashcard card) → void - Insere um Flashcard em deck e em deckCopy
-
insertCards(
FlashcardList cards) → void - Insere uma lista de Flashcards em deck e em deckCopy
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
pullCard(
) → Flashcard - Remove o proximo Flashcard do deck e o retorna
-
pullRandomCard(
) → Flashcard - Remove um Flashcard aleatoriamente do deck e o retorna
-
removeCard(
Flashcard card) → void - Remove um Flashcard do deck e do deckCopy
-
reset(
) → void - Reinicia o deck usando como parametro o deckCopy
-
setName(
String newName) → void - Altera o nome do baralho
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited