Skip to content

Commit

Permalink
Hide platform links for Apple
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Oct 10, 2022
1 parent 7870441 commit c63d8be
Showing 1 changed file with 123 additions and 121 deletions.
244 changes: 123 additions & 121 deletions lib/ui/app/menu_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1331,134 +1331,136 @@ void _showAbout(BuildContext context) async {
title: Text(state.user.fullName),
subtitle: Text(state.user.email),
),
Padding(
padding: const EdgeInsets.only(top: 4),
child: AppButton(
label: localization.appPlatforms.toUpperCase(),
iconData: MdiIcons.desktopMac,
onPressed: () {
showDialog<AlertDialog>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
actions: [
TextButton(
child: Text(
localization.sourceCode.toUpperCase()),
onPressed: () {
showDialog<AlertDialog>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
actions: [
TextButton(
child: Text(localization.close
.toUpperCase()),
onPressed: () =>
Navigator.of(context).pop(),
),
],
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
Text('Backend'),
AppButton(
label: 'Laravel/PHP',
iconData: MdiIcons.server,
onPressed: () => launchUrl(
Uri.parse(
kSourceCodeBackend)),
),
Padding(
padding:
const EdgeInsets.only(
top: 30),
child: Text('Frontend'),
),
AppButton(
label: 'Flutter/Dart',
iconData:
MdiIcons.desktopClassic,
onPressed: () => launchUrl(
Uri.parse(
kSourceCodeFrontend)),
),
AppButton(
label: 'Storefront SDK',
iconData: MdiIcons.tools,
onPressed: () => launchUrl(
Uri.parse(
kSourceCodeFrontendSDK)),
if (!isApple())
Padding(
padding: const EdgeInsets.only(top: 4),
child: AppButton(
label: localization.appPlatforms.toUpperCase(),
iconData: MdiIcons.desktopMac,
onPressed: () {
showDialog<AlertDialog>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
actions: [
TextButton(
child: Text(localization.sourceCode
.toUpperCase()),
onPressed: () {
showDialog<AlertDialog>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
actions: [
TextButton(
child: Text(localization.close
.toUpperCase()),
onPressed: () =>
Navigator.of(context)
.pop(),
),
],
),
);
},
);
},
),
TextButton(
child:
Text(localization.close.toUpperCase()),
onPressed: () =>
Navigator.of(context).pop(),
),
],
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
Text(localization.desktop),
AppButton(
label: 'Windows',
iconData: MdiIcons.microsoftWindows,
onPressed: () =>
launchUrl(Uri.parse(kWindowsUrl)),
),
AppButton(
label: 'macOS',
iconData: MdiIcons.apple,
onPressed: () =>
launchUrl(Uri.parse(kMacOSUrl)),
),
AppButton(
label: 'Linux',
iconData: MdiIcons.linux,
onPressed: () =>
launchUrl(Uri.parse(kLinuxUrl)),
),
Padding(
padding: const EdgeInsets.only(top: 30),
child: Text(localization.mobile),
),
AppButton(
label: 'iOS',
iconData: MdiIcons.apple,
onPressed: () =>
launchUrl(Uri.parse(kAppleStoreUrl)),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
Text('Backend'),
AppButton(
label: 'Laravel/PHP',
iconData: MdiIcons.server,
onPressed: () => launchUrl(
Uri.parse(
kSourceCodeBackend)),
),
Padding(
padding:
const EdgeInsets.only(
top: 30),
child: Text('Frontend'),
),
AppButton(
label: 'Flutter/Dart',
iconData:
MdiIcons.desktopClassic,
onPressed: () => launchUrl(
Uri.parse(
kSourceCodeFrontend)),
),
AppButton(
label: 'Storefront SDK',
iconData: MdiIcons.tools,
onPressed: () => launchUrl(
Uri.parse(
kSourceCodeFrontendSDK)),
),
],
),
);
},
);
},
),
AppButton(
label: 'Android',
iconData: MdiIcons.android,
TextButton(
child: Text(
localization.close.toUpperCase()),
onPressed: () =>
launchUrl(Uri.parse(kGoogleStoreUrl)),
),
AppButton(
label: 'F-Droid',
iconData: MdiIcons.android,
onPressed: () => launchUrl(
Uri.parse(kGoogleFDroidUrl)),
Navigator.of(context).pop(),
),
],
),
);
});
},
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
Text(localization.desktop),
AppButton(
label: 'Windows',
iconData: MdiIcons.microsoftWindows,
onPressed: () =>
launchUrl(Uri.parse(kWindowsUrl)),
),
AppButton(
label: 'macOS',
iconData: MdiIcons.apple,
onPressed: () =>
launchUrl(Uri.parse(kMacOSUrl)),
),
AppButton(
label: 'Linux',
iconData: MdiIcons.linux,
onPressed: () =>
launchUrl(Uri.parse(kLinuxUrl)),
),
Padding(
padding: const EdgeInsets.only(top: 30),
child: Text(localization.mobile),
),
AppButton(
label: 'iOS',
iconData: MdiIcons.apple,
onPressed: () => launchUrl(
Uri.parse(kAppleStoreUrl)),
),
AppButton(
label: 'Android',
iconData: MdiIcons.android,
onPressed: () => launchUrl(
Uri.parse(kGoogleStoreUrl)),
),
AppButton(
label: 'F-Droid',
iconData: MdiIcons.android,
onPressed: () => launchUrl(
Uri.parse(kGoogleFDroidUrl)),
),
],
),
);
});
},
),
),
),
AppButton(
label: (localization.releaseNotes).toUpperCase(),
iconData: MdiIcons.note,
Expand Down

0 comments on commit c63d8be

Please sign in to comment.