diff --git a/app/lib/models/entry.dart b/app/lib/models/entry.dart index 8338922757..86e5590321 100644 --- a/app/lib/models/entry.dart +++ b/app/lib/models/entry.dart @@ -269,7 +269,7 @@ class Entry { } } if (item is List) { - item.replaceRange(0, item.length, item.map(mapper).whereNotNull()); + item.replaceRange(0, item.length, item.map(mapper).nonNulls()); } } diff --git a/app/lib/widgets/components/app/cinematic_view.dart b/app/lib/widgets/components/app/cinematic_view.dart index 3e0f21499c..3e81ff340e 100644 --- a/app/lib/widgets/components/app/cinematic_view.dart +++ b/app/lib/widgets/components/app/cinematic_view.dart @@ -163,7 +163,7 @@ List _allSegments(_AllSegmentsRef ref, String entryId) { final paths = ref.watch(_segmentPathsProvider(entryId)); return paths.keys .map((path) => ref.watch(_segmentsProvider(entryId, path))) - .whereNotNull() + .nonNulls() .expand((x) => x) .toList(); } @@ -386,7 +386,7 @@ String _longestEntryName(_LongestEntryNameRef ref) { final entryIds = ref.watch(_cinematicEntryIdsProvider); final names = entryIds .map((entryId) => ref.watch(entryNameProvider(entryId))) - .whereNotNull() + .nonNulls() .toList() + ["追踪时长"]; return names.isEmpty @@ -534,7 +534,7 @@ int _totalSequenceFrames(_TotalSequenceFramesRef ref) { final entryIds = ref.watch(_cinematicEntryIdsProvider); final frames = entryIds .map((entryId) => ref.watch(_endingFrameProvider(entryId))) - .whereNotNull() + .nonNulls() .toList(); return frames.map((frame) => frame).maxOrNull ?? 0; } diff --git a/app/lib/widgets/components/app/entry_search.dart b/app/lib/widgets/components/app/entry_search.dart index 477f8d8a89..04cfe305e6 100644 --- a/app/lib/widgets/components/app/entry_search.dart +++ b/app/lib/widgets/components/app/entry_search.dart @@ -94,7 +94,7 @@ Fuzzy _fuzzyEntries(_FuzzyEntriesRef ref) { blueprint: blueprint, entry: entry, ); - }).whereNotNull(); + }).nonNulls(); }).toList(); return Fuzzy(