* opt: unused layout

* mod: semantics

* opt: DanmakuMsg type

* opt: avoid cast

* opt: unnecessary_lambdas

* opt: use isEven

* opt: logger

* opt: invalid common page

* tweak

* opt: unify DynController
This commit is contained in:
My-Responsitories
2025-08-27 12:01:53 +08:00
committed by GitHub
parent 56ffc2781f
commit 5f8313901b
83 changed files with 551 additions and 545 deletions

View File

@@ -48,6 +48,18 @@ extension IterableExt<T> on Iterable<T>? {
bool get isNullOrEmpty => this == null || this!.isEmpty;
}
extension MapExt<K, V> on Map<K, V> {
Map<RK, RV> fromCast<RK, RV>() {
return Map<RK, RV>.from(this);
}
}
extension NonNullListExt<T> on List<T> {
List<R> fromCast<R>() {
return List<R>.from(this);
}
}
extension ListExt<T> on List<T>? {
T? getOrNull(int index) {
if (isNullOrEmpty) {