mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-02-02 14:16:58 +00:00
feat(ui): Select device icon depending on the platform we are runnning on
This commit is contained in:
parent
9532ddc8af
commit
b4f700d56a
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:auto_route/auto_route.dart';
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -12,32 +14,70 @@ class AboutApplicationPage extends StatelessWidget {
|
||||||
const AboutApplicationPage({super.key});
|
const AboutApplicationPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(final BuildContext context) => BrandHeroScreen(
|
Widget build(final BuildContext context) {
|
||||||
hasBackButton: true,
|
IconData getPlatformIcon() {
|
||||||
hasFlashButton: false,
|
if (Platform.isAndroid) {
|
||||||
heroTitle: 'about_application_page.title'.tr(),
|
return Icons.phone_android_outlined;
|
||||||
bodyPadding: const EdgeInsets.symmetric(vertical: 16),
|
} else if (Platform.isIOS) {
|
||||||
children: [
|
return Icons.phone_iphone_outlined;
|
||||||
Padding(
|
} else if (Platform.isWindows || Platform.isLinux) {
|
||||||
padding: const EdgeInsets.all(16),
|
return Icons.desktop_windows_outlined;
|
||||||
child: Text(
|
} else if (Platform.isMacOS) {
|
||||||
'about_application_page.versions'.tr(),
|
return Icons.desktop_mac_outlined;
|
||||||
style: Theme.of(context).textTheme.labelLarge!.copyWith(
|
} else {
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
return Icons.devices_other_outlined;
|
||||||
),
|
}
|
||||||
),
|
}
|
||||||
|
|
||||||
|
final deviceIcon = getPlatformIcon();
|
||||||
|
|
||||||
|
return BrandHeroScreen(
|
||||||
|
hasBackButton: true,
|
||||||
|
hasFlashButton: false,
|
||||||
|
heroTitle: 'about_application_page.title'.tr(),
|
||||||
|
bodyPadding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Text(
|
||||||
|
'about_application_page.versions'.tr(),
|
||||||
|
style: Theme.of(context).textTheme.labelLarge!.copyWith(
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
FutureBuilder(
|
||||||
|
future: _packageVersion(),
|
||||||
|
builder: (final context, final snapshot) => ListTile(
|
||||||
|
title: Text(
|
||||||
|
'about_application_page.application_version_text'.tr(),
|
||||||
|
),
|
||||||
|
subtitle: Text(
|
||||||
|
snapshot.data.toString(),
|
||||||
|
),
|
||||||
|
leading: Icon(
|
||||||
|
deviceIcon,
|
||||||
|
),
|
||||||
|
onLongPress: () {
|
||||||
|
PlatformAdapter.setClipboard(
|
||||||
|
snapshot.data.toString(),
|
||||||
|
);
|
||||||
|
getIt<NavigationService>().showSnackBar(
|
||||||
|
'basis.copied_to_clipboard'.tr(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (getIt<ApiConnectionRepository>().apiData.apiVersion.data != null)
|
||||||
FutureBuilder(
|
FutureBuilder(
|
||||||
future: _packageVersion(),
|
future: _apiVersion(),
|
||||||
builder: (final context, final snapshot) => ListTile(
|
builder: (final context, final snapshot) => ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
'about_application_page.application_version_text'.tr(),
|
'about_application_page.api_version_text'.tr(),
|
||||||
),
|
|
||||||
subtitle: Text(
|
|
||||||
snapshot.data.toString(),
|
|
||||||
),
|
),
|
||||||
|
subtitle: Text(snapshot.data.toString()),
|
||||||
leading: const Icon(
|
leading: const Icon(
|
||||||
Icons.phone_android_outlined,
|
Icons.api_outlined,
|
||||||
),
|
),
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
PlatformAdapter.setClipboard(
|
PlatformAdapter.setClipboard(
|
||||||
|
@ -49,313 +89,292 @@ class AboutApplicationPage extends StatelessWidget {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (getIt<ApiConnectionRepository>().apiData.apiVersion.data != null)
|
FutureBuilder(
|
||||||
FutureBuilder(
|
future: _packageVersion(),
|
||||||
future: _apiVersion(),
|
builder: (final context, final snapshot) => ListTile(
|
||||||
builder: (final context, final snapshot) => ListTile(
|
title: Text('about_application_page.open_source_licenses'.tr()),
|
||||||
title: Text(
|
onTap: () => showLicensePage(
|
||||||
'about_application_page.api_version_text'.tr(),
|
context: context,
|
||||||
|
applicationName: 'SelfPrivacy',
|
||||||
|
applicationVersion: snapshot.data.toString(),
|
||||||
|
applicationLegalese: '© 2024 SelfPrivacy',
|
||||||
|
),
|
||||||
|
leading: const Icon(
|
||||||
|
Icons.copyright_outlined,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Text(
|
||||||
|
'about_application_page.links'.tr(),
|
||||||
|
style: Theme.of(context).textTheme.labelLarge!.copyWith(
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
),
|
),
|
||||||
subtitle: Text(snapshot.data.toString()),
|
),
|
||||||
leading: const Icon(
|
),
|
||||||
Icons.api_outlined,
|
ListTile(
|
||||||
|
title: Text('about_application_page.website'.tr()),
|
||||||
|
subtitle: const Text('selfprivacy.org'),
|
||||||
|
onTap: () => launchUrl(
|
||||||
|
Uri.parse('https://selfprivacy.org/'),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
),
|
||||||
|
leading: const Icon(
|
||||||
|
Icons.language_outlined,
|
||||||
|
),
|
||||||
|
onLongPress: () {
|
||||||
|
PlatformAdapter.setClipboard(
|
||||||
|
'https://selfprivacy.org/',
|
||||||
|
);
|
||||||
|
getIt<NavigationService>().showSnackBar(
|
||||||
|
'basis.copied_to_clipboard'.tr(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
title: Text('about_application_page.documentation'.tr()),
|
||||||
|
subtitle: const Text('selfprivacy.org/docs'),
|
||||||
|
onTap: () => launchUrl(
|
||||||
|
Uri.parse('https://selfprivacy.org/docs/'),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
),
|
||||||
|
leading: const Icon(
|
||||||
|
Icons.library_books_outlined,
|
||||||
|
),
|
||||||
|
onLongPress: () {
|
||||||
|
PlatformAdapter.setClipboard(
|
||||||
|
'https://selfprivacy.org/docs/',
|
||||||
|
);
|
||||||
|
getIt<NavigationService>().showSnackBar(
|
||||||
|
'basis.copied_to_clipboard'.tr(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
title: Text('about_application_page.privacy_policy'.tr()),
|
||||||
|
subtitle: const Text('selfprivacy.org/privacy-policy'),
|
||||||
|
onTap: () => launchUrl(
|
||||||
|
Uri.parse('https://selfprivacy.org/privacy-policy/'),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
),
|
||||||
|
leading: const Icon(
|
||||||
|
Icons.policy_outlined,
|
||||||
|
),
|
||||||
|
onLongPress: () {
|
||||||
|
PlatformAdapter.setClipboard(
|
||||||
|
'https://selfprivacy.org/privacy-policy/',
|
||||||
|
);
|
||||||
|
getIt<NavigationService>().showSnackBar(
|
||||||
|
'basis.copied_to_clipboard'.tr(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
// Matrix channel
|
||||||
|
ListTile(
|
||||||
|
title: Text('about_application_page.matrix_channel'.tr()),
|
||||||
|
subtitle: const Text('#news:selfprivacy.org'),
|
||||||
|
onTap: () => launchUrl(
|
||||||
|
Uri.parse('https://matrix.to/#/#news:selfprivacy.org'),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
),
|
||||||
|
leading: const Icon(
|
||||||
|
Icons.feed_outlined,
|
||||||
|
),
|
||||||
|
onLongPress: () {
|
||||||
|
PlatformAdapter.setClipboard(
|
||||||
|
'#news:selfprivacy.org',
|
||||||
|
);
|
||||||
|
getIt<NavigationService>().showSnackBar(
|
||||||
|
'basis.copied_to_clipboard'.tr(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
// Telegram channel
|
||||||
|
ListTile(
|
||||||
|
title: Text('about_application_page.telegram_channel'.tr()),
|
||||||
|
subtitle: const Text('@selfprivacy'),
|
||||||
|
onTap: () => launchUrl(
|
||||||
|
Uri.parse('https://t.me/selfprivacy'),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
),
|
||||||
|
leading: const Icon(
|
||||||
|
Icons.feed_outlined,
|
||||||
|
),
|
||||||
|
onLongPress: () {
|
||||||
|
PlatformAdapter.setClipboard(
|
||||||
|
'@selfprivacy',
|
||||||
|
);
|
||||||
|
getIt<NavigationService>().showSnackBar(
|
||||||
|
'basis.copied_to_clipboard'.tr(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Text(
|
||||||
|
'about_application_page.get_support'.tr(),
|
||||||
|
style: Theme.of(context).textTheme.labelLarge!.copyWith(
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
),
|
),
|
||||||
onLongPress: () {
|
|
||||||
PlatformAdapter.setClipboard(
|
|
||||||
snapshot.data.toString(),
|
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
FutureBuilder(
|
|
||||||
future: _packageVersion(),
|
|
||||||
builder: (final context, final snapshot) => ListTile(
|
|
||||||
title: Text('about_application_page.open_source_licenses'.tr()),
|
|
||||||
onTap: () => showLicensePage(
|
|
||||||
context: context,
|
|
||||||
applicationName: 'SelfPrivacy',
|
|
||||||
applicationVersion: snapshot.data.toString(),
|
|
||||||
applicationLegalese: '© 2024 SelfPrivacy',
|
|
||||||
),
|
|
||||||
leading: const Icon(
|
|
||||||
Icons.copyright_outlined,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
padding: const EdgeInsets.all(16),
|
// Matrix
|
||||||
child: Text(
|
ListTile(
|
||||||
'about_application_page.links'.tr(),
|
title: Text('about_application_page.matrix_support_chat'.tr()),
|
||||||
style: Theme.of(context).textTheme.labelLarge!.copyWith(
|
subtitle: const Text('#chat:selfprivacy.org'),
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
onTap: () => launchUrl(
|
||||||
),
|
Uri.parse('https://matrix.to/#/#chat:selfprivacy.org'),
|
||||||
),
|
mode: LaunchMode.externalApplication,
|
||||||
),
|
),
|
||||||
ListTile(
|
leading: const Icon(
|
||||||
title: Text('about_application_page.website'.tr()),
|
Icons.question_answer_outlined,
|
||||||
subtitle: const Text('selfprivacy.org'),
|
|
||||||
onTap: () => launchUrl(
|
|
||||||
Uri.parse('https://selfprivacy.org/'),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
),
|
|
||||||
leading: const Icon(
|
|
||||||
Icons.language_outlined,
|
|
||||||
),
|
|
||||||
onLongPress: () {
|
|
||||||
PlatformAdapter.setClipboard(
|
|
||||||
'https://selfprivacy.org/',
|
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
ListTile(
|
onLongPress: () {
|
||||||
title: Text('about_application_page.documentation'.tr()),
|
PlatformAdapter.setClipboard(
|
||||||
subtitle: const Text('selfprivacy.org/docs'),
|
'#chat:selfprivacy.org',
|
||||||
onTap: () => launchUrl(
|
);
|
||||||
Uri.parse('https://selfprivacy.org/docs/'),
|
getIt<NavigationService>().showSnackBar(
|
||||||
mode: LaunchMode.externalApplication,
|
'basis.copied_to_clipboard'.tr(),
|
||||||
),
|
);
|
||||||
leading: const Icon(
|
},
|
||||||
Icons.library_books_outlined,
|
),
|
||||||
),
|
// Telegram
|
||||||
onLongPress: () {
|
ListTile(
|
||||||
PlatformAdapter.setClipboard(
|
title: Text('about_application_page.telegram_support_chat'.tr()),
|
||||||
'https://selfprivacy.org/docs/',
|
subtitle: const Text('@selfprivacy_chat'),
|
||||||
);
|
onTap: () => launchUrl(
|
||||||
getIt<NavigationService>().showSnackBar(
|
Uri.parse('https://t.me/selfprivacy_chat'),
|
||||||
'basis.copied_to_clipboard'.tr(),
|
mode: LaunchMode.externalApplication,
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
ListTile(
|
leading: const Icon(
|
||||||
title: Text('about_application_page.privacy_policy'.tr()),
|
Icons.question_answer_outlined,
|
||||||
subtitle: const Text('selfprivacy.org/privacy-policy'),
|
|
||||||
onTap: () => launchUrl(
|
|
||||||
Uri.parse('https://selfprivacy.org/privacy-policy/'),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
),
|
|
||||||
leading: const Icon(
|
|
||||||
Icons.policy_outlined,
|
|
||||||
),
|
|
||||||
onLongPress: () {
|
|
||||||
PlatformAdapter.setClipboard(
|
|
||||||
'https://selfprivacy.org/privacy-policy/',
|
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
// Matrix channel
|
onLongPress: () {
|
||||||
ListTile(
|
PlatformAdapter.setClipboard(
|
||||||
title: Text('about_application_page.matrix_channel'.tr()),
|
'@selfprivacy_chat',
|
||||||
subtitle: const Text('#news:selfprivacy.org'),
|
);
|
||||||
onTap: () => launchUrl(
|
getIt<NavigationService>().showSnackBar(
|
||||||
Uri.parse('https://matrix.to/#/#news:selfprivacy.org'),
|
'basis.copied_to_clipboard'.tr(),
|
||||||
mode: LaunchMode.externalApplication,
|
);
|
||||||
),
|
},
|
||||||
leading: const Icon(
|
),
|
||||||
Icons.feed_outlined,
|
// Email
|
||||||
),
|
ListTile(
|
||||||
onLongPress: () {
|
title: Text('about_application_page.email_support'.tr()),
|
||||||
PlatformAdapter.setClipboard(
|
subtitle: const Text('support@selfprivacy.org'),
|
||||||
'#news:selfprivacy.org',
|
onTap: () => launchUrl(
|
||||||
);
|
Uri.parse('mailto:support@selfprivacy.org'),
|
||||||
getIt<NavigationService>().showSnackBar(
|
mode: LaunchMode.externalApplication,
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
// Telegram channel
|
leading: const Icon(
|
||||||
ListTile(
|
Icons.email_outlined,
|
||||||
title: Text('about_application_page.telegram_channel'.tr()),
|
|
||||||
subtitle: const Text('@selfprivacy'),
|
|
||||||
onTap: () => launchUrl(
|
|
||||||
Uri.parse('https://t.me/selfprivacy'),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
),
|
|
||||||
leading: const Icon(
|
|
||||||
Icons.feed_outlined,
|
|
||||||
),
|
|
||||||
onLongPress: () {
|
|
||||||
PlatformAdapter.setClipboard(
|
|
||||||
'@selfprivacy',
|
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
Padding(
|
onLongPress: () {
|
||||||
padding: const EdgeInsets.all(16),
|
PlatformAdapter.setClipboard(
|
||||||
child: Text(
|
'support@selfprivacy.org',
|
||||||
'about_application_page.get_support'.tr(),
|
);
|
||||||
style: Theme.of(context).textTheme.labelLarge!.copyWith(
|
getIt<NavigationService>().showSnackBar(
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
'basis.copied_to_clipboard'.tr(),
|
||||||
),
|
);
|
||||||
),
|
},
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Text(
|
||||||
|
'about_application_page.contribute'.tr(),
|
||||||
|
style: Theme.of(context).textTheme.labelLarge!.copyWith(
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// Matrix
|
),
|
||||||
ListTile(
|
// Source code
|
||||||
title: Text('about_application_page.matrix_support_chat'.tr()),
|
ListTile(
|
||||||
subtitle: const Text('#chat:selfprivacy.org'),
|
title: Text('about_application_page.source_code'.tr()),
|
||||||
onTap: () => launchUrl(
|
subtitle: const Text('git.selfprivacy.org'),
|
||||||
Uri.parse('https://matrix.to/#/#chat:selfprivacy.org'),
|
onTap: () => launchUrl(
|
||||||
mode: LaunchMode.externalApplication,
|
Uri.parse(
|
||||||
|
'https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app',
|
||||||
),
|
),
|
||||||
leading: const Icon(
|
mode: LaunchMode.externalApplication,
|
||||||
Icons.question_answer_outlined,
|
|
||||||
),
|
|
||||||
onLongPress: () {
|
|
||||||
PlatformAdapter.setClipboard(
|
|
||||||
'#chat:selfprivacy.org',
|
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
// Telegram
|
leading: const Icon(
|
||||||
ListTile(
|
Icons.code_outlined,
|
||||||
title: Text('about_application_page.telegram_support_chat'.tr()),
|
|
||||||
subtitle: const Text('@selfprivacy_chat'),
|
|
||||||
onTap: () => launchUrl(
|
|
||||||
Uri.parse('https://t.me/selfprivacy_chat'),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
),
|
|
||||||
leading: const Icon(
|
|
||||||
Icons.question_answer_outlined,
|
|
||||||
),
|
|
||||||
onLongPress: () {
|
|
||||||
PlatformAdapter.setClipboard(
|
|
||||||
'@selfprivacy_chat',
|
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
// Email
|
onLongPress: () {
|
||||||
ListTile(
|
PlatformAdapter.setClipboard(
|
||||||
title: Text('about_application_page.email_support'.tr()),
|
'https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app',
|
||||||
subtitle: const Text('support@selfprivacy.org'),
|
);
|
||||||
onTap: () => launchUrl(
|
getIt<NavigationService>().showSnackBar(
|
||||||
Uri.parse('mailto:support@selfprivacy.org'),
|
'basis.copied_to_clipboard'.tr(),
|
||||||
mode: LaunchMode.externalApplication,
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
// translate
|
||||||
|
ListTile(
|
||||||
|
title: Text('about_application_page.help_translate'.tr()),
|
||||||
|
subtitle: const Text('weblate.selfprivacy.org'),
|
||||||
|
onTap: () => launchUrl(
|
||||||
|
Uri.parse(
|
||||||
|
'https://weblate.selfprivacy.org/projects/selfprivacy/',
|
||||||
),
|
),
|
||||||
leading: const Icon(
|
mode: LaunchMode.externalApplication,
|
||||||
Icons.email_outlined,
|
|
||||||
),
|
|
||||||
onLongPress: () {
|
|
||||||
PlatformAdapter.setClipboard(
|
|
||||||
'support@selfprivacy.org',
|
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
Padding(
|
leading: const Icon(
|
||||||
padding: const EdgeInsets.all(16),
|
Icons.translate_outlined,
|
||||||
child: Text(
|
|
||||||
'about_application_page.contribute'.tr(),
|
|
||||||
style: Theme.of(context).textTheme.labelLarge!.copyWith(
|
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
// Source code
|
onLongPress: () {
|
||||||
ListTile(
|
PlatformAdapter.setClipboard(
|
||||||
title: Text('about_application_page.source_code'.tr()),
|
'https://weblate.selfprivacy.org/projects/selfprivacy/',
|
||||||
subtitle: const Text('git.selfprivacy.org'),
|
);
|
||||||
onTap: () => launchUrl(
|
getIt<NavigationService>().showSnackBar(
|
||||||
Uri.parse(
|
'basis.copied_to_clipboard'.tr(),
|
||||||
'https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app',
|
);
|
||||||
),
|
},
|
||||||
mode: LaunchMode.externalApplication,
|
),
|
||||||
),
|
// matrix chat
|
||||||
leading: const Icon(
|
ListTile(
|
||||||
Icons.code_outlined,
|
title: Text('about_application_page.matrix_contributors_chat'.tr()),
|
||||||
),
|
subtitle: const Text('#dev:selfprivacy.org'),
|
||||||
onLongPress: () {
|
onTap: () => launchUrl(
|
||||||
PlatformAdapter.setClipboard(
|
Uri.parse('https://matrix.to/#/#dev:selfprivacy.org'),
|
||||||
'https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app',
|
mode: LaunchMode.externalApplication,
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
// translate
|
leading: const Icon(
|
||||||
ListTile(
|
Icons.question_answer_outlined,
|
||||||
title: Text('about_application_page.help_translate'.tr()),
|
|
||||||
subtitle: const Text('weblate.selfprivacy.org'),
|
|
||||||
onTap: () => launchUrl(
|
|
||||||
Uri.parse(
|
|
||||||
'https://weblate.selfprivacy.org/projects/selfprivacy/',
|
|
||||||
),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
),
|
|
||||||
leading: const Icon(
|
|
||||||
Icons.translate_outlined,
|
|
||||||
),
|
|
||||||
onLongPress: () {
|
|
||||||
PlatformAdapter.setClipboard(
|
|
||||||
'https://weblate.selfprivacy.org/projects/selfprivacy/',
|
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
// matrix chat
|
onLongPress: () {
|
||||||
ListTile(
|
PlatformAdapter.setClipboard(
|
||||||
title: Text('about_application_page.matrix_contributors_chat'.tr()),
|
'#dev:selfprivacy.org',
|
||||||
subtitle: const Text('#dev:selfprivacy.org'),
|
);
|
||||||
onTap: () => launchUrl(
|
getIt<NavigationService>().showSnackBar(
|
||||||
Uri.parse('https://matrix.to/#/#dev:selfprivacy.org'),
|
'basis.copied_to_clipboard'.tr(),
|
||||||
mode: LaunchMode.externalApplication,
|
);
|
||||||
),
|
},
|
||||||
leading: const Icon(
|
),
|
||||||
Icons.question_answer_outlined,
|
// telegram
|
||||||
),
|
ListTile(
|
||||||
onLongPress: () {
|
title: Text('about_application_page.telegram_contributors_chat'.tr()),
|
||||||
PlatformAdapter.setClipboard(
|
subtitle: const Text('@selfprivacy_dev'),
|
||||||
'#dev:selfprivacy.org',
|
onTap: () => launchUrl(
|
||||||
);
|
Uri.parse('https://t.me/selfprivacy_dev'),
|
||||||
getIt<NavigationService>().showSnackBar(
|
mode: LaunchMode.externalApplication,
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
// telegram
|
leading: const Icon(
|
||||||
ListTile(
|
Icons.question_answer_outlined,
|
||||||
title:
|
|
||||||
Text('about_application_page.telegram_contributors_chat'.tr()),
|
|
||||||
subtitle: const Text('@selfprivacy_dev'),
|
|
||||||
onTap: () => launchUrl(
|
|
||||||
Uri.parse('https://t.me/selfprivacy_dev'),
|
|
||||||
mode: LaunchMode.externalApplication,
|
|
||||||
),
|
|
||||||
leading: const Icon(
|
|
||||||
Icons.question_answer_outlined,
|
|
||||||
),
|
|
||||||
onLongPress: () {
|
|
||||||
PlatformAdapter.setClipboard(
|
|
||||||
'@selfprivacy_dev',
|
|
||||||
);
|
|
||||||
getIt<NavigationService>().showSnackBar(
|
|
||||||
'basis.copied_to_clipboard'.tr(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
onLongPress: () {
|
||||||
);
|
PlatformAdapter.setClipboard(
|
||||||
|
'@selfprivacy_dev',
|
||||||
|
);
|
||||||
|
getIt<NavigationService>().showSnackBar(
|
||||||
|
'basis.copied_to_clipboard'.tr(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Future<String> _packageVersion() async {
|
Future<String> _packageVersion() async {
|
||||||
String packageVersion = 'unknown';
|
String packageVersion = 'unknown';
|
||||||
|
|
Loading…
Reference in a new issue