From ac5155e5f4ebfd6fab0c3381cf0baa0ec78b884a Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 6 Mar 2023 07:51:40 -0600 Subject: [PATCH] padding fix --- .../add_custom_token_selector.dart | 62 +++++++++---------- 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_custom_token_selector.dart b/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_custom_token_selector.dart index 6c12107b0..d84db9b6c 100644 --- a/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_custom_token_selector.dart +++ b/lib/pages/add_wallet_views/add_token_view/sub_widgets/add_custom_token_selector.dart @@ -18,46 +18,40 @@ class AddCustomTokenSelector extends StatelessWidget { Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.symmetric(vertical: 4), - child: RawMaterialButton( - fillColor: Theme.of(context).extension()!.popupBG, - elevation: 0, - focusElevation: 0, - hoverElevation: 0, - highlightElevation: 0, - constraints: const BoxConstraints(), + child: MaterialButton( + key: const Key("coinSelectItemButtonKey_add_custom"), + padding: Util.isDesktop + ? const EdgeInsets.only(left: 24) + : const EdgeInsets.all(12), + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), ), onPressed: addFunction, - child: Padding( - padding: Util.isDesktop - ? const EdgeInsets.only(left: 24) - : const EdgeInsets.all(12), - child: ConstrainedBox( - constraints: BoxConstraints( - minHeight: Util.isDesktop ? 70 : 0, - ), - child: Row( - children: [ - SvgPicture.asset( - Assets.svg.circlePlusFilled, - color: Theme.of(context).extension()!.textDark, - width: 26, - height: 26, - ), - const SizedBox( - width: 12, - ), - Text( - "Add custom token", - style: Util.isDesktop - ? STextStyles.desktopTextMedium(context) - : STextStyles.w600_14(context), - ), - ], - ), + child: ConstrainedBox( + constraints: BoxConstraints( + minHeight: Util.isDesktop ? 70 : 0, + ), + child: Row( + children: [ + SvgPicture.asset( + Assets.svg.circlePlusFilled, + color: Theme.of(context).extension()!.textDark, + width: 26, + height: 26, + ), + const SizedBox( + width: 12, + ), + Text( + "Add custom token", + style: Util.isDesktop + ? STextStyles.desktopTextMedium(context) + : STextStyles.w600_14(context), + ), + ], ), ), ),