Update lib/screens/scan_tab.dart
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ae39f2cbaf
commit
94e0ab436b
1 changed files with 4 additions and 2 deletions
|
|
@ -150,8 +150,10 @@ class ScanTabState extends State<ScanTab> {
|
|||
.toList(),
|
||||
onChanged: (id) {
|
||||
setState(() {
|
||||
_selectedCollection = _collections
|
||||
.firstWhere((c) => c.id == id);
|
||||
final matching =
|
||||
_collections.where((c) => c.id == id);
|
||||
_selectedCollection =
|
||||
matching.isNotEmpty ? matching.first : null;
|
||||
});
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue