mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-30 15:25:47 +08:00
feat: audio page (#1518)
* feat: audio page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * opt ui Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * impl intro, share, fav Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * tweaks Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * load prev/next Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -67,6 +67,14 @@ extension NonNullListExt<T> on List<T> {
|
||||
List<R> fromCast<R>() {
|
||||
return List<R>.from(this);
|
||||
}
|
||||
|
||||
T findClosestTarget(
|
||||
bool Function(T) test,
|
||||
T Function(T, T) combine,
|
||||
) {
|
||||
final filters = where(test).toList();
|
||||
return filters.isNotEmpty ? filters.reduce(combine) : reduce(combine);
|
||||
}
|
||||
}
|
||||
|
||||
extension ListExt<T> on List<T>? {
|
||||
|
||||
Reference in New Issue
Block a user