mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-23 19:05:51 +00:00
desktop address book contact buttons
This commit is contained in:
parent
a5d925fb98
commit
2ec1bda6f2
1 changed files with 88 additions and 92 deletions
|
@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue