support view full buttons desktop

This commit is contained in:
julian 2022-11-16 12:22:09 -06:00
parent f66b780e53
commit 016b90e904

View file

@ -7,7 +7,6 @@ import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart'; import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/conditional_parent.dart'; import 'package:stackwallet/widgets/conditional_parent.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart'; import 'package:stackwallet/widgets/rounded_white_container.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -138,30 +137,20 @@ class AboutItem extends StatelessWidget {
return RoundedWhiteContainer( return RoundedWhiteContainer(
padding: const EdgeInsets.all(0), padding: const EdgeInsets.all(0),
child: ConditionalParent( child: RawMaterialButton(
condition: !isDesktop, // splashColor: Theme.of(context).extension<StackColors>()!.highlight,
builder: (child) => RawMaterialButton( materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
// splashColor: Theme.of(context).extension<StackColors>()!.highlight, shape: RoundedRectangleBorder(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, borderRadius: BorderRadius.circular(
shape: RoundedRectangleBorder( Constants.size.circularBorderRadius,
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
),
),
onPressed: () {
launchUrl(
Uri.parse(linkUrl),
mode: LaunchMode.externalApplication,
);
},
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 20,
),
child: child,
), ),
), ),
onPressed: () {
launchUrl(
Uri.parse(linkUrl),
mode: LaunchMode.externalApplication,
);
},
child: Padding( child: Padding(
padding: isDesktop padding: isDesktop
? const EdgeInsets.symmetric( ? const EdgeInsets.symmetric(
@ -212,15 +201,19 @@ class AboutItem extends StatelessWidget {
], ],
), ),
if (isDesktop) if (isDesktop)
BlueTextButton( Text(
text: buttonText, buttonText,
onTap: () { style: STextStyles.desktopTextExtraExtraSmall(context),
launchUrl( )
Uri.parse(linkUrl), // BlueTextButton(
mode: LaunchMode.externalApplication, // text: buttonText,
); // onTap: () {
}, // launchUrl(
), // Uri.parse(linkUrl),
// mode: LaunchMode.externalApplication,
// );
// },
// ),
], ],
), ),
), ),