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-19 10:39:25 +02:00
|
|
|
import 'package:revanced_manager/ui/widgets/settingsView/social_media_item.dart';
|
2022-09-05 04:32:36 +02:00
|
|
|
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
|
2023-10-15 11:56:02 +02:00
|
|
|
import 'package:revanced_manager/ui/widgets/shared/custom_icon.dart';
|
2022-08-23 18:35:43 +02:00
|
|
|
|
2022-09-02 15:35:25 +02:00
|
|
|
class SocialMediaWidget extends StatelessWidget {
|
2022-09-19 10:39:25 +02:00
|
|
|
const SocialMediaWidget({
|
2023-11-11 13:07:32 +01:00
|
|
|
super.key,
|
2022-09-19 10:39:25 +02:00
|
|
|
this.padding,
|
2023-11-11 13:07:32 +01:00
|
|
|
});
|
2023-01-30 13:35:06 +01:00
|
|
|
final EdgeInsetsGeometry? padding;
|
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-19 10:39:25 +02:00
|
|
|
iconPadding: const EdgeInsets.symmetric(vertical: 16.0)
|
|
|
|
.add(padding ?? EdgeInsets.zero)
|
|
|
|
.resolve(Directionality.of(context)),
|
2022-09-02 15:35:25 +02:00
|
|
|
animationDuration: const Duration(milliseconds: 400),
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
2022-09-05 04:32:36 +02:00
|
|
|
header: ListTile(
|
2022-09-19 10:39:25 +02:00
|
|
|
contentPadding: padding ?? EdgeInsets.zero,
|
2022-09-05 04:32:36 +02:00
|
|
|
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-19 10:39:25 +02:00
|
|
|
expanded: Padding(
|
|
|
|
padding: padding ?? EdgeInsets.zero,
|
2023-05-14 12:45:35 +02:00
|
|
|
child: const CustomCard(
|
2022-09-19 10:39:25 +02:00
|
|
|
child: Column(
|
2023-05-14 12:45:35 +02:00
|
|
|
children: <Widget>[
|
2023-10-15 11:56:02 +02:00
|
|
|
SocialMediaItem(
|
|
|
|
icon: Icon(CustomIcon.revancedIcon),
|
|
|
|
title: Text('Website'),
|
|
|
|
subtitle: Text('revanced.app'),
|
|
|
|
url: 'https://revanced.app',
|
|
|
|
),
|
2022-09-19 10:39:25 +02:00
|
|
|
SocialMediaItem(
|
|
|
|
icon: FaIcon(FontAwesomeIcons.github),
|
|
|
|
title: Text('GitHub'),
|
2023-10-21 10:33:36 +02:00
|
|
|
subtitle: Text('github.com/ReVanced'),
|
|
|
|
url: 'https://github.com/ReVanced',
|
2022-09-19 10:39:25 +02:00
|
|
|
),
|
|
|
|
SocialMediaItem(
|
|
|
|
icon: FaIcon(FontAwesomeIcons.discord),
|
|
|
|
title: Text('Discord'),
|
|
|
|
subtitle: Text('discord.gg/revanced'),
|
|
|
|
url: 'https://discord.gg/rF2YcEjcrT',
|
|
|
|
),
|
|
|
|
SocialMediaItem(
|
|
|
|
icon: FaIcon(FontAwesomeIcons.telegram),
|
|
|
|
title: Text('Telegram'),
|
|
|
|
subtitle: Text('t.me/app_revanced'),
|
|
|
|
url: 'https://t.me/app_revanced',
|
|
|
|
),
|
|
|
|
SocialMediaItem(
|
|
|
|
icon: FaIcon(FontAwesomeIcons.reddit),
|
|
|
|
title: Text('Reddit'),
|
|
|
|
subtitle: Text('r/revancedapp'),
|
|
|
|
url: 'https://reddit.com/r/revancedapp',
|
|
|
|
),
|
|
|
|
SocialMediaItem(
|
2023-10-21 10:32:13 +02:00
|
|
|
icon: FaIcon(FontAwesomeIcons.xTwitter),
|
|
|
|
title: Text('X'),
|
2022-09-19 10:39:25 +02:00
|
|
|
subtitle: Text('@revancedapp'),
|
2023-10-21 10:32:13 +02:00
|
|
|
url: 'https://x.com/revancedapp',
|
2022-09-19 10:39:25 +02:00
|
|
|
),
|
|
|
|
SocialMediaItem(
|
|
|
|
icon: FaIcon(FontAwesomeIcons.youtube),
|
|
|
|
title: Text('YouTube'),
|
2023-09-21 01:16:55 +02:00
|
|
|
subtitle: Text('youtube.com/@revanced'),
|
|
|
|
url: 'https://youtube.com/@revanced',
|
2022-09-19 10:39:25 +02:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2022-08-23 18:51:11 +02:00
|
|
|
),
|
2022-08-23 18:35:43 +02:00
|
|
|
),
|
2022-09-19 10:39:25 +02:00
|
|
|
collapsed: const SizedBox(),
|
2022-08-23 18:35:43 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|