feat: social media cards.

This commit is contained in:
Aunali321 2022-08-23 22:05:43 +05:30
parent 5df59c08c6
commit cb2b405b3f
6 changed files with 130 additions and 2 deletions

BIN
assets/images/github.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
assets/images/twitter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
assets/images/youtube.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View file

@ -8,6 +8,7 @@ final _themeService = locator<ThemeService>();
bool isDark = _themeService.isDarkMode;
var lightTheme = ThemeData.light().copyWith(
backgroundColor: const Color.fromARGB(255, 243, 243, 243),
navigationBarTheme: NavigationBarThemeData(
indicatorColor: const Color.fromRGBO(75, 129, 210, 0.20),
backgroundColor: const Color(0xffCBDFFC),
@ -17,7 +18,6 @@ var lightTheme = ThemeData.light().copyWith(
),
),
),
backgroundColor: Colors.red,
useMaterial3: true,
textButtonTheme: TextButtonThemeData(
style: ButtonStyle(
@ -41,6 +41,7 @@ var lightTheme = ThemeData.light().copyWith(
);
var darkTheme = ThemeData.dark().copyWith(
backgroundColor: const Color(0xff1E1E1E),
navigationBarTheme: NavigationBarThemeData(
iconTheme: MaterialStateProperty.all(const IconThemeData(
color: Colors.white,
@ -53,7 +54,6 @@ var darkTheme = ThemeData.dark().copyWith(
),
),
),
backgroundColor: Colors.red,
useMaterial3: true,
scaffoldBackgroundColor: const Color(0xff0A0D11),
textButtonTheme: TextButtonThemeData(

View file

@ -7,6 +7,7 @@ import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/settingsView/about_info_widget.dart';
import 'package:revanced_manager/ui/widgets/settingsView/custom_text_field.dart';
import 'package:revanced_manager/ui/widgets/settingsView/settings_switch_item.dart';
import 'package:revanced_manager/ui/widgets/settingsView/social_media_cards.dart';
import 'package:stacked/stacked.dart';
import 'package:stacked_themes/stacked_themes.dart';
@ -144,6 +145,7 @@ class SettingsView extends StatelessWidget {
),
onTap: model.navigateToContributors,
),
const SocialMediaCards(),
const AboutWidget(),
],
),

View file

@ -0,0 +1,126 @@
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
class SocialMediaCards extends StatelessWidget {
const SocialMediaCards({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Card(
color: Theme.of(context).backgroundColor,
child: Column(
children: [
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 16).copyWith(top: 0),
leading: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/images/github.png',
height: 24,
width: 24,
color: Theme.of(context).iconTheme.color,
),
),
title: const Text('GitHub'),
subtitle: const Text('github.com/revanced'),
onTap: () => launchUrl(
Uri.parse('https://github.com/revanced'),
mode: LaunchMode.externalApplication,
),
),
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 16).copyWith(top: 0),
leading: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(
Icons.discord,
color: Theme.of(context).iconTheme.color,
),
),
title: const Text('Discord'),
subtitle: const Text('discord.gg/revanced'),
onTap: () => launchUrl(
Uri.parse('https://discord.gg/3E2pTWR4Yd'),
mode: LaunchMode.externalApplication,
),
),
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 16).copyWith(top: 0),
leading: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(
Icons.telegram,
color: Theme.of(context).iconTheme.color,
),
),
title: const Text('Telegram'),
subtitle: const Text('t.me/app_revanced'),
onTap: () => launchUrl(
Uri.parse('https://t.me/app_revanced'),
mode: LaunchMode.externalApplication,
),
),
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 16).copyWith(top: 0),
leading: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(
Icons.reddit,
color: Theme.of(context).iconTheme.color,
),
),
title: const Text('Reddit'),
subtitle: const Text('r/revancedapp'),
onTap: () => launchUrl(
Uri.parse('https://reddit.com/r/revancedapp'),
mode: LaunchMode.externalApplication,
),
),
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 16).copyWith(top: 0),
leading: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/images/twitter.png',
height: 24,
width: 24,
color: Theme.of(context).iconTheme.color,
),
),
title: const Text('Twitter'),
subtitle: const Text('@revancedapp'),
onTap: () => launchUrl(
Uri.parse('https://twitter.com/@revancedapp'),
mode: LaunchMode.externalApplication,
),
),
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 16).copyWith(top: 0),
leading: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/images/youtube.png',
height: 24,
width: 24,
color: Theme.of(context).iconTheme.color,
),
),
title: const Text('YouTube'),
subtitle: const Text('youtube.com/revanced'),
onTap: () => launchUrl(
Uri.parse(
'https://www.youtube.com/channel/UCLktAUh5Gza9zAJBStwxNdw'),
mode: LaunchMode.externalApplication,
),
),
],
),
);
}
}