2022-08-23 18:51:11 +02:00
|
|
|
import 'package:expandable/expandable.dart';
|
2022-08-23 18:35:43 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2022-09-02 15:35:25 +02:00
|
|
|
import 'package:flutter_i18n/flutter_i18n.dart';
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
2022-09-05 04:32:36 +02:00
|
|
|
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
|
2022-08-23 18:35:43 +02:00
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
2022-09-02 15:35:25 +02:00
|
|
|
class SocialMediaWidget extends StatelessWidget {
|
|
|
|
const SocialMediaWidget({Key? key}) : super(key: key);
|
2022-08-23 18:35:43 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2022-08-23 18:51:11 +02:00
|
|
|
return ExpandablePanel(
|
|
|
|
theme: ExpandableThemeData(
|
|
|
|
hasIcon: true,
|
|
|
|
iconColor: Theme.of(context).iconTheme.color,
|
2022-09-02 15:35:25 +02:00
|
|
|
iconPadding: const EdgeInsets.symmetric(vertical: 16.0),
|
|
|
|
animationDuration: const Duration(milliseconds: 400),
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
2022-09-05 04:32:36 +02:00
|
|
|
header: ListTile(
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
title: I18nText(
|
|
|
|
'socialMediaCard.widgetTitle',
|
|
|
|
child: const Text(
|
|
|
|
'',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 20,
|
|
|
|
fontWeight: FontWeight.w500,
|
2022-09-02 15:35:25 +02:00
|
|
|
),
|
|
|
|
),
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
2022-09-05 04:32:36 +02:00
|
|
|
subtitle: I18nText('socialMediaCard.widgetSubtitle'),
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
2022-09-05 04:32:36 +02:00
|
|
|
expanded: CustomCard(
|
2022-08-23 18:51:11 +02:00
|
|
|
child: Column(
|
2022-09-02 15:35:25 +02:00
|
|
|
children: <Widget>[
|
2022-08-23 18:51:11 +02:00
|
|
|
ListTile(
|
2022-09-05 04:32:36 +02:00
|
|
|
contentPadding: EdgeInsets.zero,
|
2022-08-23 18:51:11 +02:00
|
|
|
leading: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
2022-09-02 15:35:25 +02:00
|
|
|
child: FaIcon(
|
|
|
|
FontAwesomeIcons.github,
|
2022-09-07 13:20:13 +02:00
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'GitHub',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
subtitle: Text(
|
|
|
|
'github.com/revanced',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
2022-08-23 18:35:43 +02:00
|
|
|
),
|
2022-08-23 18:51:11 +02:00
|
|
|
onTap: () => launchUrl(
|
|
|
|
Uri.parse('https://github.com/revanced'),
|
|
|
|
mode: LaunchMode.externalApplication,
|
2022-08-23 18:35:43 +02:00
|
|
|
),
|
|
|
|
),
|
2022-08-23 18:51:11 +02:00
|
|
|
ListTile(
|
2022-09-05 04:32:36 +02:00
|
|
|
contentPadding: EdgeInsets.zero,
|
2022-08-23 18:51:11 +02:00
|
|
|
leading: Padding(
|
2022-09-02 15:35:25 +02:00
|
|
|
padding: const EdgeInsets.all(8.0).copyWith(left: 5),
|
|
|
|
child: FaIcon(
|
|
|
|
FontAwesomeIcons.discord,
|
2022-09-07 13:20:13 +02:00
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'Discord',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
subtitle: Text(
|
|
|
|
'discord.gg/revanced',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () => launchUrl(
|
2022-09-02 15:35:25 +02:00
|
|
|
Uri.parse('https://discord.gg/rF2YcEjcrT'),
|
2022-08-23 18:51:11 +02:00
|
|
|
mode: LaunchMode.externalApplication,
|
2022-08-23 18:35:43 +02:00
|
|
|
),
|
|
|
|
),
|
2022-08-23 18:51:11 +02:00
|
|
|
ListTile(
|
2022-09-05 04:32:36 +02:00
|
|
|
contentPadding: EdgeInsets.zero,
|
2022-08-23 18:51:11 +02:00
|
|
|
leading: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
2022-09-02 15:35:25 +02:00
|
|
|
child: FaIcon(
|
|
|
|
FontAwesomeIcons.telegram,
|
2022-09-07 13:20:13 +02:00
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'Telegram',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
subtitle: Text(
|
|
|
|
't.me/app_revanced',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () => launchUrl(
|
|
|
|
Uri.parse('https://t.me/app_revanced'),
|
|
|
|
mode: LaunchMode.externalApplication,
|
2022-08-23 18:35:43 +02:00
|
|
|
),
|
|
|
|
),
|
2022-08-23 18:51:11 +02:00
|
|
|
ListTile(
|
2022-09-05 04:32:36 +02:00
|
|
|
contentPadding: EdgeInsets.zero,
|
2022-08-23 18:51:11 +02:00
|
|
|
leading: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
2022-09-02 15:35:25 +02:00
|
|
|
child: FaIcon(
|
|
|
|
FontAwesomeIcons.reddit,
|
2022-09-07 13:20:13 +02:00
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'Reddit',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
subtitle: Text(
|
|
|
|
'r/revancedapp',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () => launchUrl(
|
|
|
|
Uri.parse('https://reddit.com/r/revancedapp'),
|
|
|
|
mode: LaunchMode.externalApplication,
|
|
|
|
),
|
2022-08-23 18:35:43 +02:00
|
|
|
),
|
2022-08-23 18:51:11 +02:00
|
|
|
ListTile(
|
2022-09-05 04:32:36 +02:00
|
|
|
contentPadding: EdgeInsets.zero,
|
2022-08-23 18:51:11 +02:00
|
|
|
leading: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
2022-09-02 15:35:25 +02:00
|
|
|
child: FaIcon(
|
|
|
|
FontAwesomeIcons.twitter,
|
2022-09-07 13:20:13 +02:00
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'Twitter',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
subtitle: Text(
|
|
|
|
'@revancedapp',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () => launchUrl(
|
2022-09-02 15:35:25 +02:00
|
|
|
Uri.parse('https://twitter.com/revancedapp'),
|
2022-08-23 18:51:11 +02:00
|
|
|
mode: LaunchMode.externalApplication,
|
2022-08-23 18:35:43 +02:00
|
|
|
),
|
|
|
|
),
|
2022-08-23 18:51:11 +02:00
|
|
|
ListTile(
|
2022-09-05 04:32:36 +02:00
|
|
|
contentPadding: EdgeInsets.zero,
|
2022-08-23 18:51:11 +02:00
|
|
|
leading: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
2022-09-02 15:35:25 +02:00
|
|
|
child: FaIcon(
|
|
|
|
FontAwesomeIcons.youtube,
|
2022-09-07 13:20:13 +02:00
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
'YouTube',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
subtitle: Text(
|
|
|
|
'youtube.com/revanced',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.secondary,
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () => launchUrl(
|
2022-09-02 15:35:25 +02:00
|
|
|
Uri.parse('https://youtube.com/revanced'),
|
2022-08-23 18:51:11 +02:00
|
|
|
mode: LaunchMode.externalApplication,
|
|
|
|
),
|
2022-08-23 18:35:43 +02:00
|
|
|
),
|
2022-08-23 18:51:11 +02:00
|
|
|
],
|
|
|
|
),
|
2022-08-23 18:35:43 +02:00
|
|
|
),
|
2022-09-02 15:35:25 +02:00
|
|
|
collapsed: Container(),
|
2022-08-23 18:35:43 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|