desktop address book contact buttons

This commit is contained in:
ryleedavis 2022-11-15 13:45:06 -07:00
parent a5d925fb98
commit 2ec1bda6f2

View file

@ -9,7 +9,6 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/conditional_parent.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
class AddressBookCard extends ConsumerStatefulWidget {
@ -59,8 +58,29 @@ class _AddressBookCardState extends ConsumerState<AddressBookCard> {
}
}
return ConditionalParent(
condition: !isDesktop,
return RoundedWhiteContainer(
padding: const EdgeInsets.all(4),
child: RawMaterialButton(
// splashColor: Theme.of(context).extension<StackColors>()!.highlight,
padding: const EdgeInsets.all(0),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
),
),
onPressed: () {
showDialog<void>(
context: context,
useSafeArea: true,
barrierDismissible: true,
builder: (_) => ContactPopUp(
contactId: contact.id,
),
);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Container(
@ -129,42 +149,18 @@ class _AddressBookCardState extends ConsumerState<AddressBookCard> {
],
),
if (isDesktop) const Spacer(),
if (isDesktop)
SvgPicture.asset(
widget.indicatorDown == true
? Assets.svg.chevronDown
: Assets.svg.chevronUp,
width: 10,
height: 5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle2,
),
// if (isDesktop)
// SvgPicture.asset(
// widget.indicatorDown == true
// ? Assets.svg.chevronDown
// : Assets.svg.chevronUp,
// width: 10,
// height: 5,
// color:
// Theme.of(context).extension<StackColors>()!.textSubtitle2,
// ),
],
),
builder: (child) => RoundedWhiteContainer(
padding: const EdgeInsets.all(4),
child: RawMaterialButton(
// splashColor: Theme.of(context).extension<StackColors>()!.highlight,
padding: const EdgeInsets.all(0),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
),
),
onPressed: () {
showDialog<void>(
context: context,
useSafeArea: true,
barrierDismissible: true,
builder: (_) => ContactPopUp(
contactId: contact.id,
),
);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: child,
),
),
),
);