fixed weird plus things and it's working really well :3

This commit is contained in:
Kima 2024-04-09 21:59:54 +02:00
parent a51d65f7cc
commit abc595357f
3 changed files with 58 additions and 1 deletions

View File

@ -1,3 +1,5 @@
// ignore_for_file: use_build_context_synchronously
import 'package:refilc/theme/colors/colors.dart';
import 'package:refilc_mobile_ui/plus/plus_screen.i18n.dart';
import 'package:refilc_mobile_ui/plus/components/plan_card.dart';
@ -308,6 +310,58 @@ class PlusScreenState extends State<PlusScreen> {
title: Text('show_lifetime'.i18n),
),
),
// reactivate plus
const SizedBox(
height: 18.0,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.0),
border: Border.all(
color: AppColors.of(context).text.withOpacity(0.2),
),
),
child: ListTile(
contentPadding:
const EdgeInsets.only(left: 15.0, right: 10.0),
onTap: () async {
final result = await context
.read<PlusProvider>()
.auth
.refreshAuth(reactivate: true);
if (mounted) {
if (result) {
ScaffoldMessenger.of(context)
.showSnackBar(const SnackBar(
content: Text(
"Sikeres aktiválás!",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold),
),
backgroundColor: Colors.green,
));
Future.delayed(const Duration(seconds: 2),
() => Navigator.of(context).pop());
} else {
ScaffoldMessenger.of(context)
.showSnackBar(const SnackBar(
content: Text(
"Sikertelen aktiválás. Kérlek próbáld újra később!",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold),
),
backgroundColor: Colors.red,
));
}
}
},
title: Text('reactivate'.i18n),
),
),
// faq section
const SizedBox(
height: 30.0,

View File

@ -52,6 +52,7 @@ extension SettingsLocalization on String {
"show_lifetime": "Show Lifetime Plans",
"more_soon": "More coming soon...",
"faq_dc": "To redeem your benefits, contact us on Discord in DMs!",
"reactivate": "Reactivate Existing Subscription",
},
"hu_hu": {
"even_more_cheaper": "Még több reFilc, olcsóbban,\nmint bármi más!",
@ -103,6 +104,7 @@ extension SettingsLocalization on String {
"more_soon": "Hamarosan mégtöbb finomság...",
"faq_dc":
"Az előnyök beváltásához írj nekünk Discord-on privát üzenetet!",
"reactivate": "Meglévő előfizetés újraaktiválása",
},
"de_de": {
"even_more_cheaper": "Mehr reFilc, günstiger\nals alles andere!",
@ -155,6 +157,7 @@ extension SettingsLocalization on String {
"more_soon": "Mehr folgt bald...",
"faq_dc":
"Az előnyök beváltásához írj nekünk Discord-on privát üzenetet!",
"reactivate": "Bestehendes Abonnement reaktivieren",
},
};

@ -1 +1 @@
Subproject commit 8ac99d0163878fcf173f62ddaa47dd5ac700418c
Subproject commit c2754b83ae2167857626653291185d4df59f0eba