From 7d535e8c0c51c0447740688b638767719c0a8ed1 Mon Sep 17 00:00:00 2001 From: Vadim Date: Thu, 23 Mar 2023 23:34:08 +0300 Subject: [PATCH] fixed duplicate GlobalKeys --- .../screen_equipment_profile.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart b/lib/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart index a2ba21e..a062f62 100644 --- a/lib/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart +++ b/lib/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart @@ -23,11 +23,9 @@ class _EquipmentProfilesScreenState extends State { @override void initState() { super.initState(); - profileContainersKeys = List.filled( - EquipmentProfiles.of(context, listen: false).length, - GlobalKey(), - growable: true, - ); + profileContainersKeys = EquipmentProfiles.of(context, listen: false) + .map((e) => GlobalKey(debugLabel: e.id)) + .toList(); } @override