Hide platform links for Apple

This commit is contained in:
Hillel Coren 2022-10-10 20:31:25 +03:00
parent 7870441d5c
commit c63d8beea9
1 changed files with 124 additions and 122 deletions

View File

@ -1331,6 +1331,7 @@ void _showAbout(BuildContext context) async {
title: Text(state.user.fullName), title: Text(state.user.fullName),
subtitle: Text(state.user.email), subtitle: Text(state.user.email),
), ),
if (!isApple())
Padding( Padding(
padding: const EdgeInsets.only(top: 4), padding: const EdgeInsets.only(top: 4),
child: AppButton( child: AppButton(
@ -1343,8 +1344,8 @@ void _showAbout(BuildContext context) async {
return AlertDialog( return AlertDialog(
actions: [ actions: [
TextButton( TextButton(
child: Text( child: Text(localization.sourceCode
localization.sourceCode.toUpperCase()), .toUpperCase()),
onPressed: () { onPressed: () {
showDialog<AlertDialog>( showDialog<AlertDialog>(
context: context, context: context,
@ -1355,7 +1356,8 @@ void _showAbout(BuildContext context) async {
child: Text(localization.close child: Text(localization.close
.toUpperCase()), .toUpperCase()),
onPressed: () => onPressed: () =>
Navigator.of(context).pop(), Navigator.of(context)
.pop(),
), ),
], ],
content: Column( content: Column(
@ -1400,8 +1402,8 @@ void _showAbout(BuildContext context) async {
}, },
), ),
TextButton( TextButton(
child: child: Text(
Text(localization.close.toUpperCase()), localization.close.toUpperCase()),
onPressed: () => onPressed: () =>
Navigator.of(context).pop(), Navigator.of(context).pop(),
), ),
@ -1437,14 +1439,14 @@ void _showAbout(BuildContext context) async {
AppButton( AppButton(
label: 'iOS', label: 'iOS',
iconData: MdiIcons.apple, iconData: MdiIcons.apple,
onPressed: () => onPressed: () => launchUrl(
launchUrl(Uri.parse(kAppleStoreUrl)), Uri.parse(kAppleStoreUrl)),
), ),
AppButton( AppButton(
label: 'Android', label: 'Android',
iconData: MdiIcons.android, iconData: MdiIcons.android,
onPressed: () => onPressed: () => launchUrl(
launchUrl(Uri.parse(kGoogleStoreUrl)), Uri.parse(kGoogleStoreUrl)),
), ),
AppButton( AppButton(
label: 'F-Droid', label: 'F-Droid',