finished refilc+ purchase page
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:filcnaplo/icons/filc_icons.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/premium_screen.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/plus_screen.dart';
|
||||
import 'package:refilc_plus/models/premium_scopes.dart';
|
||||
import 'package:refilc_plus/providers/premium_provider.dart';
|
||||
import 'package:refilc_plus/ui/mobile/premium/upsell.dart';
|
||||
@@ -85,7 +85,7 @@ class ActiveSponsorCard extends StatelessWidget {
|
||||
onTap: () {
|
||||
Navigator.of(context, rootNavigator: true)
|
||||
.push(MaterialPageRoute(builder: (context) {
|
||||
return const PremiumScreen();
|
||||
return const PlusScreen();
|
||||
}));
|
||||
},
|
||||
child: Padding(
|
||||
|
||||
113
filcnaplo_mobile_ui/lib/premium/components/github_button.dart
Normal file
113
filcnaplo_mobile_ui/lib/premium/components/github_button.dart
Normal file
@@ -0,0 +1,113 @@
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:refilc_plus/providers/premium_provider.dart';
|
||||
import 'package:refilc_plus/ui/mobile/premium/activation_view/activation_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class GithubLoginButton extends StatelessWidget {
|
||||
const GithubLoginButton({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final premium = Provider.of<PremiumProvider>(context);
|
||||
|
||||
return Card(
|
||||
margin: EdgeInsets.zero,
|
||||
elevation: 0,
|
||||
color: const Color(0xFFC1CBDF),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16.0)),
|
||||
child: InkWell(
|
||||
borderRadius: BorderRadius.circular(14.0),
|
||||
onTap: () {
|
||||
if (premium.hasPremium) {
|
||||
premium.auth.refreshAuth(removePremium: true);
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||
content: Text(
|
||||
"reFilc+ támogatás deaktiválva!",
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18.0),
|
||||
),
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
));
|
||||
return;
|
||||
}
|
||||
|
||||
Navigator.of(context).push(MaterialPageRoute(builder: (context) {
|
||||
return const PremiumActivationView();
|
||||
}));
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"assets/images/btn_github.svg",
|
||||
height: 28.0,
|
||||
),
|
||||
Positioned.fill(
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Transform.translate(
|
||||
offset: const Offset(3.5, 4.6),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFFC1CBDF),
|
||||
// color: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: const SizedBox(
|
||||
height: 10.0,
|
||||
width: 10.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned.fill(
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Transform.translate(
|
||||
offset: const Offset(2.0, 2.0),
|
||||
child: Icon(
|
||||
premium.hasPremium
|
||||
? FeatherIcons.minusCircle
|
||||
: FeatherIcons.plusCircle,
|
||||
color: const Color(0xFF243F76),
|
||||
size: 14.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 18.0,
|
||||
),
|
||||
Text(
|
||||
premium.hasPremium
|
||||
? "Github szétkapcsolása"
|
||||
: "Fiók összekötése Github-al",
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 18,
|
||||
color: Color(0xFF243F76),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 4.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,154 +1,223 @@
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class PremiumPlanCard extends StatelessWidget {
|
||||
const PremiumPlanCard({
|
||||
class PlusPlanCard extends StatelessWidget {
|
||||
const PlusPlanCard({
|
||||
super.key,
|
||||
this.icon,
|
||||
this.title,
|
||||
this.description,
|
||||
required this.iconPath,
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.color,
|
||||
this.price = 0,
|
||||
this.url,
|
||||
this.gradient,
|
||||
this.active = false,
|
||||
this.borderRadius,
|
||||
this.features = const [],
|
||||
});
|
||||
|
||||
final Widget? icon;
|
||||
final Widget? title;
|
||||
final int price;
|
||||
final Widget? description;
|
||||
final String? url;
|
||||
final Gradient? gradient;
|
||||
final String iconPath;
|
||||
final String title;
|
||||
final String description;
|
||||
final Color color;
|
||||
final double price;
|
||||
final Uri? url;
|
||||
final bool active;
|
||||
final BorderRadiusGeometry? borderRadius;
|
||||
final List<List<String>> features;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
margin: EdgeInsets.zero,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
|
||||
child: InkWell(
|
||||
customBorder:
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
|
||||
onTap: () {
|
||||
if (url != null) {
|
||||
launchUrl(
|
||||
Uri.parse(url!),
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
}
|
||||
},
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
if (url != null) {
|
||||
launchUrl(
|
||||
url!,
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Card(
|
||||
margin: EdgeInsets.zero,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: borderRadius!,
|
||||
),
|
||||
shadowColor: Colors.transparent,
|
||||
surfaceTintColor: Theme.of(context).colorScheme.background,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
padding: const EdgeInsets.only(
|
||||
top: 18.0, bottom: 16.0, left: 22.0, right: 18.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
if (!active)
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (icon != null) ...[
|
||||
IconTheme(
|
||||
data: Theme.of(context)
|
||||
.iconTheme
|
||||
.copyWith(size: 42.0),
|
||||
child: icon!,
|
||||
),
|
||||
const SizedBox(height: 12.0),
|
||||
],
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.displaySmall!
|
||||
.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 25.0),
|
||||
child: title!,
|
||||
),
|
||||
],
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
iconPath,
|
||||
width: 25.0,
|
||||
height: 25.0,
|
||||
),
|
||||
)
|
||||
else
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: gradient,
|
||||
borderRadius: BorderRadius.circular(99.0),
|
||||
),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
borderRadius: BorderRadius.circular(99.0),
|
||||
const SizedBox(
|
||||
width: 16.0,
|
||||
),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 22.0,
|
||||
color: color,
|
||||
fontWeight: FontWeight.w600,
|
||||
height: 1.2,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
gradient: active
|
||||
? const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color.fromARGB(255, 196, 213, 253),
|
||||
Color.fromARGB(255, 227, 235, 250),
|
||||
Color.fromARGB(255, 214, 226, 250),
|
||||
],
|
||||
)
|
||||
: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFFEFF4FE),
|
||||
Color(0xFFEFF4FE),
|
||||
],
|
||||
),
|
||||
margin: const EdgeInsets.all(4.0),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: const Text(
|
||||
"Aktív",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
color: const Color(0xFFEFF4FE),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8.0, vertical: 0.0),
|
||||
child: Text(
|
||||
active
|
||||
? 'Aktív'
|
||||
: '${price.toStringAsFixed(2).replaceAll('.', ',')} €',
|
||||
style: const TextStyle(
|
||||
fontSize: 16.6,
|
||||
color: Color(0xFF243F76),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
Text.rich(
|
||||
TextSpan(children: [
|
||||
TextSpan(text: "\$$price"),
|
||||
TextSpan(
|
||||
text: " / hó",
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.color!
|
||||
.withOpacity(.7)),
|
||||
),
|
||||
]),
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold, fontSize: 24.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (active) ...[
|
||||
const SizedBox(height: 18.0),
|
||||
Row(
|
||||
children: [
|
||||
if (icon != null) ...[
|
||||
IconTheme(
|
||||
data: Theme.of(context).iconTheme.copyWith(
|
||||
size: 24.0, color: AppColors.of(context).text),
|
||||
child: icon!,
|
||||
),
|
||||
],
|
||||
const SizedBox(width: 12.0),
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.displaySmall!.copyWith(
|
||||
fontWeight: FontWeight.bold, fontSize: 25.0),
|
||||
child: title!,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 6.0),
|
||||
if (description != null)
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.color!
|
||||
.withOpacity(.8),
|
||||
fontSize: 18),
|
||||
child: description!,
|
||||
const SizedBox(
|
||||
height: 12.0,
|
||||
),
|
||||
Text(
|
||||
description,
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF011234).withOpacity(0.6),
|
||||
fontSize: 13.69,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 14.20,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: features
|
||||
.map((e) => Column(
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 22.22,
|
||||
child: Text(
|
||||
e[0],
|
||||
style: const TextStyle(fontSize: 18.0),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 14.0,
|
||||
),
|
||||
Expanded(
|
||||
child: e[1].endsWith('tier_benefits')
|
||||
? Text.rich(
|
||||
style: const TextStyle(
|
||||
height: 1.2,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF011234),
|
||||
fontSize: 13.69,
|
||||
),
|
||||
TextSpan(
|
||||
children: [
|
||||
const TextSpan(
|
||||
text: 'Minden ',
|
||||
),
|
||||
e[1].startsWith('cap')
|
||||
? const TextSpan(
|
||||
text: 'Kupak',
|
||||
style: TextStyle(
|
||||
color:
|
||||
Color(0xFF47BB00),
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
)
|
||||
: const TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Kupak',
|
||||
style: TextStyle(
|
||||
color: Color(
|
||||
0xFF47BB00),
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: ' és ',
|
||||
),
|
||||
TextSpan(
|
||||
text: 'Tinta',
|
||||
style: TextStyle(
|
||||
color: Color(
|
||||
0xFF0061BB),
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const TextSpan(text: ' előny'),
|
||||
],
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
e[1],
|
||||
maxLines: 2,
|
||||
style: const TextStyle(
|
||||
height: 1.2,
|
||||
color: Color(0xFF011234),
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 13.69,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
import 'package:filcnaplo_mobile_ui/premium/components/plan_card.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:refilc_plus/providers/premium_provider.dart';
|
||||
import 'package:refilc_plus/ui/mobile/premium/upsell.dart';
|
||||
|
||||
import 'components/active_sponsor_card.dart';
|
||||
import 'components/github_button.dart';
|
||||
|
||||
class PlusScreen extends StatelessWidget {
|
||||
const PlusScreen({super.key});
|
||||
|
||||
Uri parseTierUri({required String tierId}) {
|
||||
return Uri.parse(
|
||||
'https://github.com/sponsors/refilc/sponsorships?tier_id=$tierId&preview=true');
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -21,11 +33,11 @@ class PlusScreen extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Theme.of(context).scaffoldBackgroundColor.withOpacity(0.2),
|
||||
Theme.of(context).scaffoldBackgroundColor.withOpacity(0.3),
|
||||
Theme.of(context).scaffoldBackgroundColor.withOpacity(0.1),
|
||||
Theme.of(context).scaffoldBackgroundColor.withOpacity(0.15),
|
||||
Theme.of(context).scaffoldBackgroundColor.withOpacity(0.25),
|
||||
Theme.of(context).scaffoldBackgroundColor.withOpacity(0.4),
|
||||
Theme.of(context).scaffoldBackgroundColor.withOpacity(0.5),
|
||||
Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8),
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@@ -44,11 +56,17 @@ class PlusScreen extends StatelessWidget {
|
||||
Theme.of(context)
|
||||
.scaffoldBackgroundColor
|
||||
.withOpacity(0.4),
|
||||
Theme.of(context)
|
||||
.scaffoldBackgroundColor
|
||||
.withOpacity(0.6),
|
||||
Theme.of(context)
|
||||
.scaffoldBackgroundColor
|
||||
.withOpacity(0.9),
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
stops: const [0.6, 0.7, 1.0],
|
||||
stops: const [0.0, 0.1, 0.15, 0.18, 0.22],
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
@@ -57,51 +75,496 @@ class PlusScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
'reFilc+',
|
||||
style: TextStyle(
|
||||
fontSize: 33,
|
||||
color: Color(0xFF0a1c41),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
icon: const Icon(
|
||||
FeatherIcons.x,
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Text.rich(
|
||||
TextSpan(
|
||||
text: 'Még több reFilc, olcsóbban,\nmint bármi más!',
|
||||
style: const TextStyle(
|
||||
height: 1.2,
|
||||
fontSize: 22,
|
||||
color: Color(0xFF0A1C41),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
// heading (title, x button)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 12.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
WidgetSpan(
|
||||
child: Transform.translate(
|
||||
offset: const Offset(1.0, -5.5),
|
||||
child: Text(
|
||||
'1',
|
||||
style: TextStyle(
|
||||
fontSize: 14.4,
|
||||
color: const Color(0xFF0A1C41)
|
||||
.withOpacity(0.5),
|
||||
fontWeight: FontWeight.w600,
|
||||
const Text(
|
||||
'reFilc+',
|
||||
style: TextStyle(
|
||||
fontSize: 33,
|
||||
color: Color(0xFF0a1c41),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
icon: const Icon(
|
||||
FeatherIcons.x,
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text:
|
||||
'Még több reFilc, olcsóbban,\nmint bármi más!',
|
||||
style: const TextStyle(
|
||||
height: 1.2,
|
||||
fontSize: 22,
|
||||
color: Color(0xFF0A1C41),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
children: [
|
||||
WidgetSpan(
|
||||
child: Transform.translate(
|
||||
offset: const Offset(1.0, -5.5),
|
||||
child: Text(
|
||||
'1',
|
||||
style: TextStyle(
|
||||
fontSize: 14.4,
|
||||
color: const Color(0xFF0A1C41)
|
||||
.withOpacity(0.5),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// cards and description
|
||||
const SizedBox(
|
||||
height: 60,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
const TextSpan(text: 'Támogasd a QwIT'),
|
||||
WidgetSpan(
|
||||
child: Transform.translate(
|
||||
offset: const Offset(1.0, -3.6),
|
||||
child: Text(
|
||||
'2',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF011234)
|
||||
.withOpacity(0.5),
|
||||
fontSize: 10.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const TextSpan(
|
||||
text:
|
||||
' csapatát, és szerezz cserébe pár kényelmes jutalmat!',
|
||||
),
|
||||
],
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF011234).withOpacity(0.6),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 18,
|
||||
),
|
||||
PlusPlanCard(
|
||||
active: ActiveSponsorCard.estimateLevel(
|
||||
context.watch<PremiumProvider>().scopes) ==
|
||||
PremiumFeatureLevel.cap,
|
||||
iconPath: 'assets/images/plus_tier_cap.png',
|
||||
title: 'Kupak',
|
||||
description:
|
||||
'Több személyre szabás, több fiók, egyszerű feladatfeljegyzés.',
|
||||
color: const Color(0xFF47BB00),
|
||||
url: parseTierUri(tierId: '371828'),
|
||||
price: 0.99,
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(16.0),
|
||||
bottom: Radius.circular(8.0)),
|
||||
features: const [
|
||||
['✨', 'Előzetes hozzáférés új verziókhoz'],
|
||||
['👥', '2 fiók használata egyszerre'],
|
||||
['👋', 'Egyedi üdvözlő üzenet'],
|
||||
[
|
||||
'📓',
|
||||
'Korlátlan saját jegyzet és feladat a füzet oldalon'
|
||||
],
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
PlusPlanCard(
|
||||
active: ActiveSponsorCard.estimateLevel(
|
||||
context.watch<PremiumProvider>().scopes) ==
|
||||
PremiumFeatureLevel.ink,
|
||||
iconPath: 'assets/images/plus_tier_ink.png',
|
||||
title: 'Tinta',
|
||||
description:
|
||||
'Férj hozzá még több funkcióhoz, használj még több profilt és tedd egyszerűbbé mindennapjaid.',
|
||||
color: const Color(0xFF0061BB),
|
||||
url: parseTierUri(tierId: '371944'),
|
||||
price: 2.99,
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(8.0),
|
||||
bottom: Radius.circular(8.0)),
|
||||
features: const [
|
||||
['🕑', 'Órarend jegyzetek'],
|
||||
['👥', '5 fiók használata egyszerre'],
|
||||
['🎓', 'Összesített átlagszámoló'],
|
||||
['🟦', 'Live Activity szín'],
|
||||
['🖋️', 'cap_tier_benefits'],
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
PlusPlanCard(
|
||||
active: ActiveSponsorCard.estimateLevel(
|
||||
context.watch<PremiumProvider>().scopes) ==
|
||||
PremiumFeatureLevel.sponge,
|
||||
iconPath: 'assets/images/plus_tier_sponge.png',
|
||||
title: 'Szivacs',
|
||||
description:
|
||||
'Férj hozzá még több funkcióhoz, használj még több profilt és tedd egyszerűbbé mindennapjaid.',
|
||||
color: const Color(0xFFFFC700),
|
||||
url: parseTierUri(tierId: '371945'),
|
||||
price: 4.99,
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(8.0),
|
||||
bottom: Radius.circular(16.0)),
|
||||
features: const [
|
||||
['📱', 'Alkalmazás ikonjának megváltoztatása'],
|
||||
['👥', 'Korlátlan fiók használata egyszerre'],
|
||||
['📒', 'Fejlettebb cél kitűzés'],
|
||||
['🔤', 'Egyedi betütípusok'],
|
||||
['🖋️', 'ink_cap_tier_benefits'],
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 18.0,
|
||||
),
|
||||
const GithubLoginButton(),
|
||||
const SizedBox(
|
||||
height: 30.0,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: Text(
|
||||
'Gyakori kérdések',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF011234).withOpacity(0.6),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 18,
|
||||
),
|
||||
Card(
|
||||
margin: EdgeInsets.zero,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(16.0),
|
||||
bottom: Radius.circular(8.0),
|
||||
),
|
||||
),
|
||||
shadowColor: Colors.transparent,
|
||||
surfaceTintColor:
|
||||
Theme.of(context).colorScheme.background,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 18.0,
|
||||
bottom: 16.0,
|
||||
left: 22.0,
|
||||
right: 18.0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'Mire költitek a pénzt?',
|
||||
style: TextStyle(
|
||||
fontSize: 16.6,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 14.0,
|
||||
),
|
||||
Text.rich(
|
||||
TextSpan(
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF011234)
|
||||
.withOpacity(0.6),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
children: [
|
||||
const TextSpan(
|
||||
text:
|
||||
'A támogatásokból kapott pénz elsősorban az Apple',
|
||||
),
|
||||
WidgetSpan(
|
||||
child: Transform.translate(
|
||||
offset: const Offset(1.0, -3.6),
|
||||
child: Text(
|
||||
'3',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF011234)
|
||||
.withOpacity(0.5),
|
||||
fontSize: 10.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const TextSpan(
|
||||
text:
|
||||
' Developer Program évi \$100-os díját, valamint az API mögött álló szerverek és a reFilc domain címek árát fedezi, a maradékot egyéb fejlesztésekre, fejlesztői fagyizásra fordítjuk.',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
Card(
|
||||
margin: EdgeInsets.zero,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(8.0),
|
||||
bottom: Radius.circular(16.0),
|
||||
),
|
||||
),
|
||||
shadowColor: Colors.transparent,
|
||||
surfaceTintColor:
|
||||
Theme.of(context).colorScheme.background,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 18.0,
|
||||
bottom: 16.0,
|
||||
left: 22.0,
|
||||
right: 18.0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text(
|
||||
'Még mindig nyílt a forráskód?',
|
||||
style: TextStyle(
|
||||
fontSize: 16.6,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 14.0,
|
||||
),
|
||||
Text(
|
||||
'Igen, a reFilc teljesen nyílt forráskódú, és ez így is fog maradni. A reFilc+ funkcióinak forráskódjához bármely támogatónk hozzáférhet, ha ezt Discord-on kérelmezi.',
|
||||
style: TextStyle(
|
||||
color:
|
||||
const Color(0xFF011234).withOpacity(0.6),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 30.0,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: Text(
|
||||
'Magyarázatok',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFF011234).withOpacity(0.6),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 18,
|
||||
),
|
||||
Card(
|
||||
margin: EdgeInsets.zero,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(8.0),
|
||||
bottom: Radius.circular(16.0),
|
||||
),
|
||||
),
|
||||
shadowColor: Colors.transparent,
|
||||
surfaceTintColor:
|
||||
Theme.of(context).colorScheme.background,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 18.0,
|
||||
bottom: 16.0,
|
||||
left: 22.0,
|
||||
right: 18.0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff011234),
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10.0,
|
||||
vertical: 2.5,
|
||||
),
|
||||
child: const Text(
|
||||
'1',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 14.0,
|
||||
),
|
||||
const Expanded(
|
||||
child: Text(
|
||||
'A szolgáltatás legalacsonyabb szintje olcsóbb a legtöbb ismert előfizetésnél, viszont előfordulhatnak kivételek.',
|
||||
maxLines: 5,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.4,
|
||||
height: 1.3,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 14.0,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff011234),
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8.8,
|
||||
vertical: 2.5,
|
||||
),
|
||||
child: const Text(
|
||||
'2',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 14.0,
|
||||
),
|
||||
const Expanded(
|
||||
child: Text(
|
||||
'A "QwIT" a "QwIT Development" rövid neve, ez a fejlesztői csapat neve, mely a reFilc és egyéb projektek mögött áll.',
|
||||
maxLines: 5,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.4,
|
||||
height: 1.3,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 14.0,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff011234),
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8.6,
|
||||
vertical: 2.5,
|
||||
),
|
||||
child: const Text(
|
||||
'3',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 14.0,
|
||||
),
|
||||
const Expanded(
|
||||
child: Text(
|
||||
'Az "Apple" az Apple Inc. védjegye.',
|
||||
maxLines: 5,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.4,
|
||||
height: 1.3,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 14.0,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xff011234),
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 7.9,
|
||||
vertical: 2.5,
|
||||
),
|
||||
child: const Text(
|
||||
'4',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 14.0,
|
||||
),
|
||||
const Expanded(
|
||||
child: Text(
|
||||
'Az árak jelképes összegek és csak körülbelül egyeznek a valós, Github-on látható, USA-dollárban feltűntetett árakkal.',
|
||||
maxLines: 5,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.4,
|
||||
height: 1.3,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,360 +1,360 @@
|
||||
import 'package:filcnaplo/api/client.dart';
|
||||
import 'package:filcnaplo/icons/filc_icons.dart';
|
||||
import 'package:filcnaplo/models/supporter.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/components/active_sponsor_card.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/components/github_card.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/components/github_connect_button.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/components/goal_card.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/components/plan_card.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/components/reward_card.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/components/supporters_button.dart';
|
||||
import 'package:filcnaplo_mobile_ui/premium/styles/gradients.dart';
|
||||
import 'package:refilc_plus/providers/premium_provider.dart';
|
||||
import 'package:refilc_plus/ui/mobile/premium/activation_view/activation_view.dart';
|
||||
import 'package:refilc_plus/ui/mobile/premium/upsell.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
// import 'package:filcnaplo/api/client.dart';
|
||||
// import 'package:filcnaplo/icons/filc_icons.dart';
|
||||
// import 'package:filcnaplo/models/supporter.dart';
|
||||
// import 'package:filcnaplo_mobile_ui/premium/components/active_sponsor_card.dart';
|
||||
// import 'package:filcnaplo_mobile_ui/premium/components/github_card.dart';
|
||||
// import 'package:filcnaplo_mobile_ui/premium/components/github_connect_button.dart';
|
||||
// import 'package:filcnaplo_mobile_ui/premium/components/goal_card.dart';
|
||||
// import 'package:filcnaplo_mobile_ui/premium/components/plan_card.dart';
|
||||
// import 'package:filcnaplo_mobile_ui/premium/components/reward_card.dart';
|
||||
// import 'package:filcnaplo_mobile_ui/premium/components/supporters_button.dart';
|
||||
// import 'package:filcnaplo_mobile_ui/premium/styles/gradients.dart';
|
||||
// import 'package:refilc_plus/providers/premium_provider.dart';
|
||||
// import 'package:refilc_plus/ui/mobile/premium/activation_view/activation_view.dart';
|
||||
// import 'package:refilc_plus/ui/mobile/premium/upsell.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter_svg/svg.dart';
|
||||
// import 'package:provider/provider.dart';
|
||||
|
||||
class PremiumScreen extends StatelessWidget {
|
||||
const PremiumScreen({super.key});
|
||||
// class PremiumScreen extends StatelessWidget {
|
||||
// const PremiumScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final middleColor = Theme.of(context).brightness == Brightness.dark
|
||||
? const Color.fromARGB(255, 20, 33, 57)
|
||||
: const Color.fromARGB(255, 10, 55, 140);
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// final middleColor = Theme.of(context).brightness == Brightness.dark
|
||||
// ? const Color.fromARGB(255, 20, 33, 57)
|
||||
// : const Color.fromARGB(255, 10, 55, 140);
|
||||
|
||||
final future = FilcAPI.getSupporters();
|
||||
// final future = FilcAPI.getSupporters();
|
||||
|
||||
return FutureBuilder<Supporters?>(
|
||||
future: future,
|
||||
builder: (context, snapshot) {
|
||||
return Scaffold(
|
||||
body: CustomScrollView(
|
||||
physics: const ClampingScrollPhysics(),
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
automaticallyImplyLeading: false,
|
||||
flexibleSpace: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
const Color.fromARGB(255, 65, 51, 143),
|
||||
middleColor,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
icon: const Icon(Icons.close, color: Colors.white),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SliverPadding(
|
||||
padding: const EdgeInsets.only(bottom: 25.0),
|
||||
sliver: SliverToBoxAdapter(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
middleColor,
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 64.0),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
"assets/icons/ic_rounded.png",
|
||||
width: 69.0,
|
||||
height: 69.0,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 15.0,
|
||||
),
|
||||
const Text(
|
||||
"reFilc+",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 35.0,
|
||||
color: Colors.white),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12.0),
|
||||
const Text(
|
||||
"Még több reFilc, olcsóbban, mint bármi más!*",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 25.0,
|
||||
color: Colors.white),
|
||||
),
|
||||
const SizedBox(height: 15.0),
|
||||
Text(
|
||||
"Támogasd a QwIT** csapatát, és szerezz cserébe pár kényelmes jutalmat!",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 20,
|
||||
color: Colors.white.withOpacity(.8)),
|
||||
),
|
||||
const SizedBox(height: 25.0),
|
||||
SupportersButton(supporters: future),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SliverPadding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24.0)
|
||||
.add(const EdgeInsets.only(bottom: 100)),
|
||||
sliver: SliverToBoxAdapter(
|
||||
child: Column(
|
||||
children: [
|
||||
PremiumPlanCard(
|
||||
icon: const Icon(FilcIcons.kupak),
|
||||
title: Text("Kupak",
|
||||
style: TextStyle(
|
||||
foreground: GradientStyles.kupakPaint)),
|
||||
gradient: GradientStyles.kupak,
|
||||
price: 2,
|
||||
description: const Text(
|
||||
"Szabd személyre a filcet és láss részletesebb statisztikákat."),
|
||||
url:
|
||||
"https://github.com/sponsors/filc/sponsorships?tier_id=238453&preview=true",
|
||||
active: ActiveSponsorCard.estimateLevel(
|
||||
context.watch<PremiumProvider>().scopes) ==
|
||||
PremiumFeatureLevel.cap,
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
PremiumPlanCard(
|
||||
icon: const Icon(FilcIcons.tinta),
|
||||
title: Text("Tinta",
|
||||
style: TextStyle(
|
||||
foreground: GradientStyles.tintaPaint)),
|
||||
gradient: GradientStyles.tinta,
|
||||
price: 5,
|
||||
description: const Text(
|
||||
"Kényelmesebb órarend, asztali alkalmazás és célok kitűzése."),
|
||||
url:
|
||||
"https://github.com/sponsors/filc/sponsorships?tier_id=238454&preview=true",
|
||||
active: ActiveSponsorCard.estimateLevel(
|
||||
context.watch<PremiumProvider>().scopes) ==
|
||||
PremiumFeatureLevel.ink,
|
||||
),
|
||||
const SizedBox(height: 12.0),
|
||||
PremiumGoalCard(
|
||||
progress: snapshot.data?.progress ?? 0,
|
||||
target: snapshot.data?.max ?? 1),
|
||||
const SizedBox(height: 12.0),
|
||||
const GithubConnectButton(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 14.0)
|
||||
.add(const EdgeInsets.only(top: 12.0)),
|
||||
child: const Row(
|
||||
children: [
|
||||
Icon(FilcIcons.kupak),
|
||||
SizedBox(width: 12.0),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Kupak jutalmak",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 20),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
PremiumRewardCard(
|
||||
imageKey: "premium_nickname_showcase",
|
||||
icon: SvgPicture.asset(
|
||||
"assets/images/nickname_icon.svg",
|
||||
color: Theme.of(context).iconTheme.color),
|
||||
title: const Text("Profil személyre szabás"),
|
||||
description: const Text(
|
||||
"Állíts be egy saját becenevet és egy profilképet (akár animáltat is!)"),
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
PremiumRewardCard(
|
||||
imageKey: "premium_theme_showcase",
|
||||
icon: SvgPicture.asset("assets/images/theme_icon.svg",
|
||||
color: Theme.of(context).iconTheme.color),
|
||||
title: const Text("Téma+"),
|
||||
description: const Text(
|
||||
"Válassz saját háttérszínt és kártyaszínt is, akár saját HEX-kóddal!"),
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
PremiumRewardCard(
|
||||
imageKey: "premium_stats_showcase",
|
||||
icon: SvgPicture.asset("assets/images/stats_icon.svg",
|
||||
color: Theme.of(context).iconTheme.color),
|
||||
title: const Text("Részletes jegy statisztika"),
|
||||
description: const Text(
|
||||
"Válassz heti, havi és háromhavi időtartam közül, és pontosan lásd, mennyi jegyed van."),
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
const PremiumRewardCard(
|
||||
title: Text("Még pár dolog..."),
|
||||
description: Text(
|
||||
"🔣\tVálassz ikon témát\n✨\tPrémium rang és csevegő a discord szerverünkön\n📬\tElsőbbségi segítségnyújtás"),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 14.0)
|
||||
.add(const EdgeInsets.only(top: 12.0)),
|
||||
child: const Row(
|
||||
children: [
|
||||
Icon(FilcIcons.tinta),
|
||||
SizedBox(width: 12.0),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Tinta jutalmak",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 20),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
PremiumRewardCard(
|
||||
imageKey: "premium_timetable_showcase",
|
||||
icon: SvgPicture.asset(
|
||||
"assets/images/timetable_icon.svg",
|
||||
color: Theme.of(context).iconTheme.color),
|
||||
title: const Text("Heti órarend nézet"),
|
||||
description: const Text(
|
||||
"Egy órarend, ami a teljes képernyődet kihasználja, csak nem olyan idegesítő, mint az eKRÉTA féle."),
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
PremiumRewardCard(
|
||||
imageKey: "premium_widget_showcase",
|
||||
icon: SvgPicture.asset(
|
||||
"assets/images/widget_icon.svg",
|
||||
color: Theme.of(context).iconTheme.color),
|
||||
title: const Text("Widget"),
|
||||
description: const Text(
|
||||
"Mindig lásd, milyen órád lesz, a kezdőképernyőd kényelméből."),
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
PremiumRewardCard(
|
||||
soon: true,
|
||||
imageKey: "premium_goal_showcase",
|
||||
icon: SvgPicture.asset("assets/images/goal_icon.svg",
|
||||
color: Theme.of(context).iconTheme.color),
|
||||
title: const Text("Cél követés"),
|
||||
description: const Text(
|
||||
"Add meg, mi a célod, és mi majd kiszámoljuk, hogyan juthatsz oda!"),
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
PremiumRewardCard(
|
||||
soon: true,
|
||||
imageKey: "premium_desktop_showcase",
|
||||
icon: SvgPicture.asset(
|
||||
"assets/images/desktop_icon.svg",
|
||||
color: Theme.of(context).iconTheme.color),
|
||||
title: const Text("Asztali verzió"),
|
||||
description: const Text(
|
||||
"Érd el a reFilcet a gépeden is, és menekülj meg a csúnya felhasználói felületektől!"),
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
const PremiumRewardCard(
|
||||
title: Text("Még pár dolog..."),
|
||||
description: Text(
|
||||
"🖋️\tMinden kupak jutalom\n✨\tKorai hozzáférés új verziókhoz"),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 14.0)
|
||||
.add(const EdgeInsets.only(top: 12.0)),
|
||||
child: const Row(
|
||||
children: [
|
||||
SizedBox(width: 12.0),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Mire vársz még?",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 20),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
GithubCard(
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
.push(MaterialPageRoute(builder: (context) {
|
||||
return const PremiumActivationView();
|
||||
}));
|
||||
},
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 14.0)
|
||||
.add(const EdgeInsets.only(top: 12.0)),
|
||||
child: const Row(
|
||||
children: [
|
||||
SizedBox(width: 12.0),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Gyakori kérdések",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 20),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const PremiumRewardCard(
|
||||
title: Text("Mire költitek a pénzt?"),
|
||||
description: Text(
|
||||
"A pénz elsősorban az appstore évi \$100-os díját fedezi, a maradék a szerver a weboldal és új funkciók fejlesztésére fordítjuk."),
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
const PremiumRewardCard(
|
||||
title: Text("Még mindig nyílt a forráskód?"),
|
||||
description: Text(
|
||||
"Igen, a reFilc teljesen nyílt forráskódú, és ez így is fog maradni. A prémium funkciók forráskódjához hozzáférnek a támogatók."),
|
||||
),
|
||||
const SizedBox(height: 14.0),
|
||||
const PremiumRewardCard(
|
||||
title: Text("Hol tudok támogatni?"),
|
||||
description: Text(
|
||||
"A támogatáshoz szükséged van egy Github profilra, amit hozzá kell kötnöd a filc naplóhoz. A Github “Sponsors” funkciója segítségével kezeljük az támogatásod."),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
// return FutureBuilder<Supporters?>(
|
||||
// future: future,
|
||||
// builder: (context, snapshot) {
|
||||
// return Scaffold(
|
||||
// body: CustomScrollView(
|
||||
// physics: const ClampingScrollPhysics(),
|
||||
// slivers: [
|
||||
// SliverAppBar(
|
||||
// surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
// automaticallyImplyLeading: false,
|
||||
// flexibleSpace: Container(
|
||||
// decoration: BoxDecoration(
|
||||
// gradient: LinearGradient(
|
||||
// begin: Alignment.topCenter,
|
||||
// end: Alignment.bottomCenter,
|
||||
// colors: [
|
||||
// const Color.fromARGB(255, 65, 51, 143),
|
||||
// middleColor,
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// actions: [
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(right: 8.0),
|
||||
// child: IconButton(
|
||||
// onPressed: () {
|
||||
// Navigator.of(context).pop();
|
||||
// },
|
||||
// icon: const Icon(Icons.close, color: Colors.white),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// SliverPadding(
|
||||
// padding: const EdgeInsets.only(bottom: 25.0),
|
||||
// sliver: SliverToBoxAdapter(
|
||||
// child: Container(
|
||||
// decoration: BoxDecoration(
|
||||
// gradient: LinearGradient(
|
||||
// begin: Alignment.topCenter,
|
||||
// end: Alignment.bottomCenter,
|
||||
// colors: [
|
||||
// middleColor,
|
||||
// Theme.of(context).scaffoldBackgroundColor,
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Padding(
|
||||
// padding:
|
||||
// const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// const SizedBox(height: 64.0),
|
||||
// Row(
|
||||
// children: [
|
||||
// Image.asset(
|
||||
// "assets/icons/ic_rounded.png",
|
||||
// width: 69.0,
|
||||
// height: 69.0,
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// width: 15.0,
|
||||
// ),
|
||||
// const Text(
|
||||
// "reFilc+",
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.w800,
|
||||
// fontSize: 35.0,
|
||||
// color: Colors.white),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// const SizedBox(height: 12.0),
|
||||
// const Text(
|
||||
// "Még több reFilc, olcsóbban, mint bármi más!*",
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.w600,
|
||||
// fontSize: 25.0,
|
||||
// color: Colors.white),
|
||||
// ),
|
||||
// const SizedBox(height: 15.0),
|
||||
// Text(
|
||||
// "Támogasd a QwIT** csapatát, és szerezz cserébe pár kényelmes jutalmat!",
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontSize: 20,
|
||||
// color: Colors.white.withOpacity(.8)),
|
||||
// ),
|
||||
// const SizedBox(height: 25.0),
|
||||
// SupportersButton(supporters: future),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// SliverPadding(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 24.0)
|
||||
// .add(const EdgeInsets.only(bottom: 100)),
|
||||
// sliver: SliverToBoxAdapter(
|
||||
// child: Column(
|
||||
// children: [
|
||||
// // PremiumPlanCard(
|
||||
// // icon: const Icon(FilcIcons.kupak),
|
||||
// // title: Text("Kupak",
|
||||
// // style: TextStyle(
|
||||
// // foreground: GradientStyles.kupakPaint)),
|
||||
// // gradient: GradientStyles.kupak,
|
||||
// // price: 2,
|
||||
// // description: const Text(
|
||||
// // "Szabd személyre a filcet és láss részletesebb statisztikákat."),
|
||||
// // url:
|
||||
// // "https://github.com/sponsors/filc/sponsorships?tier_id=238453&preview=true",
|
||||
// // active: ActiveSponsorCard.estimateLevel(
|
||||
// // context.watch<PremiumProvider>().scopes) ==
|
||||
// // PremiumFeatureLevel.cap,
|
||||
// // ),
|
||||
// // const SizedBox(height: 8.0),
|
||||
// // PremiumPlanCard(
|
||||
// // icon: const Icon(FilcIcons.tinta),
|
||||
// // title: Text("Tinta",
|
||||
// // style: TextStyle(
|
||||
// // foreground: GradientStyles.tintaPaint)),
|
||||
// // gradient: GradientStyles.tinta,
|
||||
// // price: 5,
|
||||
// // description: const Text(
|
||||
// // "Kényelmesebb órarend, asztali alkalmazás és célok kitűzése."),
|
||||
// // url:
|
||||
// // "https://github.com/sponsors/filc/sponsorships?tier_id=238454&preview=true",
|
||||
// // active: ActiveSponsorCard.estimateLevel(
|
||||
// // context.watch<PremiumProvider>().scopes) ==
|
||||
// // PremiumFeatureLevel.ink,
|
||||
// // ),
|
||||
// const SizedBox(height: 12.0),
|
||||
// PremiumGoalCard(
|
||||
// progress: snapshot.data?.progress ?? 0,
|
||||
// target: snapshot.data?.max ?? 1),
|
||||
// const SizedBox(height: 12.0),
|
||||
// const GithubConnectButton(),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 14.0)
|
||||
// .add(const EdgeInsets.only(top: 12.0)),
|
||||
// child: const Row(
|
||||
// children: [
|
||||
// Icon(FilcIcons.kupak),
|
||||
// SizedBox(width: 12.0),
|
||||
// Expanded(
|
||||
// child: Text(
|
||||
// "Kupak jutalmak",
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontSize: 20),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// PremiumRewardCard(
|
||||
// imageKey: "premium_nickname_showcase",
|
||||
// icon: SvgPicture.asset(
|
||||
// "assets/images/nickname_icon.svg",
|
||||
// color: Theme.of(context).iconTheme.color),
|
||||
// title: const Text("Profil személyre szabás"),
|
||||
// description: const Text(
|
||||
// "Állíts be egy saját becenevet és egy profilképet (akár animáltat is!)"),
|
||||
// ),
|
||||
// const SizedBox(height: 14.0),
|
||||
// PremiumRewardCard(
|
||||
// imageKey: "premium_theme_showcase",
|
||||
// icon: SvgPicture.asset("assets/images/theme_icon.svg",
|
||||
// color: Theme.of(context).iconTheme.color),
|
||||
// title: const Text("Téma+"),
|
||||
// description: const Text(
|
||||
// "Válassz saját háttérszínt és kártyaszínt is, akár saját HEX-kóddal!"),
|
||||
// ),
|
||||
// const SizedBox(height: 14.0),
|
||||
// PremiumRewardCard(
|
||||
// imageKey: "premium_stats_showcase",
|
||||
// icon: SvgPicture.asset("assets/images/stats_icon.svg",
|
||||
// color: Theme.of(context).iconTheme.color),
|
||||
// title: const Text("Részletes jegy statisztika"),
|
||||
// description: const Text(
|
||||
// "Válassz heti, havi és háromhavi időtartam közül, és pontosan lásd, mennyi jegyed van."),
|
||||
// ),
|
||||
// const SizedBox(height: 14.0),
|
||||
// const PremiumRewardCard(
|
||||
// title: Text("Még pár dolog..."),
|
||||
// description: Text(
|
||||
// "🔣\tVálassz ikon témát\n✨\tPrémium rang és csevegő a discord szerverünkön\n📬\tElsőbbségi segítségnyújtás"),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 14.0)
|
||||
// .add(const EdgeInsets.only(top: 12.0)),
|
||||
// child: const Row(
|
||||
// children: [
|
||||
// Icon(FilcIcons.tinta),
|
||||
// SizedBox(width: 12.0),
|
||||
// Expanded(
|
||||
// child: Text(
|
||||
// "Tinta jutalmak",
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontSize: 20),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// PremiumRewardCard(
|
||||
// imageKey: "premium_timetable_showcase",
|
||||
// icon: SvgPicture.asset(
|
||||
// "assets/images/timetable_icon.svg",
|
||||
// color: Theme.of(context).iconTheme.color),
|
||||
// title: const Text("Heti órarend nézet"),
|
||||
// description: const Text(
|
||||
// "Egy órarend, ami a teljes képernyődet kihasználja, csak nem olyan idegesítő, mint az eKRÉTA féle."),
|
||||
// ),
|
||||
// const SizedBox(height: 14.0),
|
||||
// PremiumRewardCard(
|
||||
// imageKey: "premium_widget_showcase",
|
||||
// icon: SvgPicture.asset(
|
||||
// "assets/images/widget_icon.svg",
|
||||
// color: Theme.of(context).iconTheme.color),
|
||||
// title: const Text("Widget"),
|
||||
// description: const Text(
|
||||
// "Mindig lásd, milyen órád lesz, a kezdőképernyőd kényelméből."),
|
||||
// ),
|
||||
// const SizedBox(height: 14.0),
|
||||
// PremiumRewardCard(
|
||||
// soon: true,
|
||||
// imageKey: "premium_goal_showcase",
|
||||
// icon: SvgPicture.asset("assets/images/goal_icon.svg",
|
||||
// color: Theme.of(context).iconTheme.color),
|
||||
// title: const Text("Cél követés"),
|
||||
// description: const Text(
|
||||
// "Add meg, mi a célod, és mi majd kiszámoljuk, hogyan juthatsz oda!"),
|
||||
// ),
|
||||
// const SizedBox(height: 14.0),
|
||||
// PremiumRewardCard(
|
||||
// soon: true,
|
||||
// imageKey: "premium_desktop_showcase",
|
||||
// icon: SvgPicture.asset(
|
||||
// "assets/images/desktop_icon.svg",
|
||||
// color: Theme.of(context).iconTheme.color),
|
||||
// title: const Text("Asztali verzió"),
|
||||
// description: const Text(
|
||||
// "Érd el a reFilcet a gépeden is, és menekülj meg a csúnya felhasználói felületektől!"),
|
||||
// ),
|
||||
// const SizedBox(height: 14.0),
|
||||
// const PremiumRewardCard(
|
||||
// title: Text("Még pár dolog..."),
|
||||
// description: Text(
|
||||
// "🖋️\tMinden kupak jutalom\n✨\tKorai hozzáférés új verziókhoz"),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 14.0)
|
||||
// .add(const EdgeInsets.only(top: 12.0)),
|
||||
// child: const Row(
|
||||
// children: [
|
||||
// SizedBox(width: 12.0),
|
||||
// Expanded(
|
||||
// child: Text(
|
||||
// "Mire vársz még?",
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontSize: 20),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// GithubCard(
|
||||
// onPressed: () {
|
||||
// Navigator.of(context)
|
||||
// .push(MaterialPageRoute(builder: (context) {
|
||||
// return const PremiumActivationView();
|
||||
// }));
|
||||
// },
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 14.0)
|
||||
// .add(const EdgeInsets.only(top: 12.0)),
|
||||
// child: const Row(
|
||||
// children: [
|
||||
// SizedBox(width: 12.0),
|
||||
// Expanded(
|
||||
// child: Text(
|
||||
// "Gyakori kérdések",
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontSize: 20),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// const PremiumRewardCard(
|
||||
// title: Text("Mire költitek a pénzt?"),
|
||||
// description: Text(
|
||||
// "A pénz elsősorban az appstore évi \$100-os díját fedezi, a maradék a szerver a weboldal és új funkciók fejlesztésére fordítjuk."),
|
||||
// ),
|
||||
// const SizedBox(height: 14.0),
|
||||
// const PremiumRewardCard(
|
||||
// title: Text("Még mindig nyílt a forráskód?"),
|
||||
// description: Text(
|
||||
// "Igen, a reFilc teljesen nyílt forráskódú, és ez így is fog maradni. A prémium funkciók forráskódjához hozzáférnek a támogatók."),
|
||||
// ),
|
||||
// const SizedBox(height: 14.0),
|
||||
// const PremiumRewardCard(
|
||||
// title: Text("Hol tudok támogatni?"),
|
||||
// description: Text(
|
||||
// "A támogatáshoz szükséged van egy Github profilra, amit hozzá kell kötnöd a filc naplóhoz. A Github “Sponsors” funkciója segítségével kezeljük az támogatásod."),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user