From 2253629dd6b481b3f0538924827b0fd04fad3a0d Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 30 Dec 2022 12:18:46 -0600 Subject: [PATCH] key fix for duplicate wallets edge case --- .../sub_widgets/contact_list_item.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/address_book_address_chooser/sub_widgets/contact_list_item.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/address_book_address_chooser/sub_widgets/contact_list_item.dart index d7bfefb1f..1277c5c0f 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/address_book_address_chooser/sub_widgets/contact_list_item.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/address_book_address_chooser/sub_widgets/contact_list_item.dart @@ -42,6 +42,9 @@ class _ContactListItemState extends ConsumerState { final contact = ref.watch(addressBookServiceProvider .select((value) => value.getContactById(contactId))); + // hack fix until we use a proper database (not Hive) + int i = 0; + return RoundedWhiteContainer( padding: const EdgeInsets.all(0), borderColor: Theme.of(context).extension()!.background, @@ -70,7 +73,8 @@ class _ContactListItemState extends ConsumerState { filterByCoin != null ? e.coin == filterByCoin! : true) .map( (e) => Column( - key: Key("contactAddress_${e.address}_${e.label}_key"), + key: Key( + "contactAddress_${e.address}_${e.label}_${++i}_key"), mainAxisSize: MainAxisSize.min, children: [ Container(