MusicTrackState class

O estado da trilha da música (ver o arquivo).

Implemented types
Annotations

Constructors

MusicTrackState({String? hash, Set<String> played = const {}, Map<String, Set<String>> done = const {}})
const
MusicTrackState.fromJson(Object? json)
Lê o JSON guardado; o que não for válido volta ao vazio. Aceita o JSON do LP23 (ver o arquivo).
factory

Properties

done → Map<String, Set<String>>
Música (o resumo) → as chaves dos itens feitos nela (MusicItem.key).
final
hash → String?
O resumo da última música treinada (a que o aluno abriu por último ou em que fechou uma etapa); null quer dizer que ainda não abriu nenhuma.
final
hashCode → int
The hash code for this object.
no setterinherited
played → Set<String>
As músicas já tocadas: a escolha prefere as que não estão aqui.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

choose(String hash) → MusicTrackState
A música hash passa a ser a da vez, e entra nas tocadas.
doneOf(String hash) → Set<String>
As chaves dos itens feitos da música hash (vazio se nenhum).
override
drop() → MusicTrackState
Larga a música da vez (o aluno escolhe outra); o que foi feito fica.
isDone(String hash, MusicItem item) → bool
O item item está feito na música hash.
markDone(String hash, MusicItem item) → MusicTrackState
O item item da música hash fica feito. Refazer um item feito não muda nada.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited
withLast(String hash) → MusicTrackState
A música hash é a última treinada (aberta pelo aluno): a lista a põe à parte, no topo. Não conta como tocada (played fica como está).

Operators

operator ==(Object other) → bool
The equality operator.
inherited