We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d2708d commit a77b3a3Copy full SHA for a77b3a3
lib/widgets/input.dart
@@ -398,15 +398,18 @@ class MapInputPage extends StatelessWidget {
398
}
399
400
_handleDelete(MapEntry<String, String> item) {
401
- final index = items.indexWhere(
+ final entries = List<MapEntry<String, String>>.from(
402
+ items,
403
+ );
404
+ final index = entries.indexWhere(
405
(entry) {
- return entry.key == item.key;
406
+ return entry.key == item.key && item.value == entry.value;
407
},
408
);
409
if (index != -1) {
- items.removeAt(index);
410
+ entries.removeAt(index);
411
- onChange(Map.fromEntries(items));
412
+ onChange(Map.fromEntries(entries));
413
414
415
@override
0 commit comments