fix: contact id access fixes

This commit is contained in:
julian 2023-05-16 09:33:28 -06:00
parent 8294614383
commit e843065278
3 changed files with 12 additions and 12 deletions

View file

@ -270,7 +270,7 @@ class _ContactDetailsViewState extends ConsumerState<ContactDetailsView> {
onPressed: () {
Navigator.of(context).pushNamed(
EditContactNameEmojiView.routeName,
arguments: _contact.id,
arguments: _contact.customId,
);
},
style: Theme.of(context)
@ -318,7 +318,7 @@ class _ContactDetailsViewState extends ConsumerState<ContactDetailsView> {
onTap: () {
Navigator.of(context).pushNamed(
AddNewContactAddressView.routeName,
arguments: _contact.id,
arguments: _contact.customId,
);
},
),
@ -385,7 +385,7 @@ class _ContactDetailsViewState extends ConsumerState<ContactDetailsView> {
Navigator.of(context).pushNamed(
EditContactAddressView.routeName,
arguments: Tuple2(_contact.id, e),
arguments: Tuple2(_contact.customId, e),
);
},
child: RoundedContainer(

View file

@ -110,7 +110,7 @@ class ContactPopUp extends ConsumerWidget {
.textFieldDefaultBG,
borderRadius: BorderRadius.circular(32),
),
child: contact.id == "default"
child: contact.customId == "default"
? Center(
child: SvgPicture.file(
File(
@ -146,13 +146,13 @@ class ContactPopUp extends ConsumerWidget {
STextStyles.itemSubtitle12(context),
),
),
if (contact.id != "default")
if (contact.customId != "default")
TextButton(
onPressed: () {
Navigator.pop(context);
Navigator.of(context).pushNamed(
ContactDetailsView.routeName,
arguments: contact.id,
arguments: contact.customId,
);
},
style: Theme.of(context)
@ -176,7 +176,7 @@ class ContactPopUp extends ConsumerWidget {
),
),
SizedBox(
height: contact.id == "default" ? 16 : 8,
height: contact.customId == "default" ? 16 : 8,
),
Container(
height: 1,
@ -233,14 +233,14 @@ class ContactPopUp extends ConsumerWidget {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
if (contact.id == "default")
if (contact.customId == "default")
Text(
e.other!,
style:
STextStyles.itemSubtitle12(
context),
),
if (contact.id != "default")
if (contact.customId != "default")
Text(
"${e.label} (${e.coin.ticker})",
style:
@ -336,13 +336,13 @@ class ContactPopUp extends ConsumerWidget {
),
],
),
if (contact.id != "default" &&
if (contact.customId != "default" &&
hasActiveWallet &&
!isExchangeFlow)
const SizedBox(
width: 4,
),
if (contact.id != "default" &&
if (contact.customId != "default" &&
hasActiveWallet &&
!isExchangeFlow)
Column(

View file

@ -111,7 +111,7 @@ class _DesktopContactDetailsState extends ConsumerState<DesktopContactDetails> {
width: 32,
height: 32,
decoration: BoxDecoration(
color: contact.id == "default"
color: contact.customId == "default"
? Colors.transparent
: Theme.of(context)
.extension<StackColors>()!