TF-4195 Add Label to Thread

This commit is contained in:
dab246
2026-01-06 12:35:13 +07:00
committed by Dat H. Pham
parent ef1efc9310
commit 94fd6f8071
34 changed files with 829 additions and 40 deletions
@@ -9,6 +9,13 @@ extension MapKeywordsExtension on Map<KeyWordIdentifier, bool>? {
List<KeyWordIdentifier> get enabledKeywords =>
this?.entries.where((e) => e.value).map((e) => e.key).toList() ?? [];
Set<KeyWordIdentifier> get enabledKeywordSet => this == null
? const {}
: {
for (final entry in this!.entries)
if (entry.value) entry.key
};
Map<KeyWordIdentifier, bool> withKeyword(KeyWordIdentifier keyword) {
return Map<KeyWordIdentifier, bool>.from(this ?? {})..[keyword] = true;
}