diff --git a/refilc_mobile_ui/lib/plus/components/plan_card.dart b/refilc_mobile_ui/lib/plus/components/plan_card.dart index d2636bb..d1a9567 100644 --- a/refilc_mobile_ui/lib/plus/components/plan_card.dart +++ b/refilc_mobile_ui/lib/plus/components/plan_card.dart @@ -18,6 +18,7 @@ class PlusPlanCard extends StatelessWidget { this.active = false, this.borderRadius, this.features = const [], + required this.docsAccepted, }); final String iconPath; @@ -30,11 +31,25 @@ class PlusPlanCard extends StatelessWidget { final bool active; final BorderRadiusGeometry? borderRadius; final List> features; + final bool docsAccepted; @override Widget build(BuildContext context) { return GestureDetector( onTap: () { + if (!docsAccepted) { + ScaffoldMessenger.of(context).showSnackBar(const SnackBar( + content: Text( + "El kell fogadnod az ÁSZF-et és az Adatkezelési Tájékoztatót!", + style: + TextStyle(color: Colors.black, fontWeight: FontWeight.bold), + ), + backgroundColor: Colors.white, + )); + + return; + } + if (Provider.of(context, listen: false).hasPremium) { if (!active) { launchUrl( diff --git a/refilc_mobile_ui/lib/plus/plus_screen.dart b/refilc_mobile_ui/lib/plus/plus_screen.dart index 7759721..385f20d 100644 --- a/refilc_mobile_ui/lib/plus/plus_screen.dart +++ b/refilc_mobile_ui/lib/plus/plus_screen.dart @@ -25,6 +25,7 @@ class PlusScreenState extends State { } bool showLifetime = false; + bool docsAccepted = false; @override Widget build(BuildContext context) { @@ -226,6 +227,7 @@ class PlusScreenState extends State { ['👑', 'rfp_15'.i18n], ['🔜', 'more_soon'.i18n], ], + docsAccepted: docsAccepted, ), const SizedBox( height: 12.0, @@ -259,6 +261,7 @@ class PlusScreenState extends State { const ['🖋️', 'cap_tier_benefits'], ['🔜', 'more_soon'.i18n], ], + docsAccepted: docsAccepted, ), // const SizedBox( // height: 8.0, @@ -373,6 +376,50 @@ class PlusScreenState extends State { ), ), ), + // aszf warning + const SizedBox( + height: 18.0, + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(16.0), + border: Border.all( + color: Colors.black.withOpacity(0.2), + ), + ), + child: CheckboxListTile( + contentPadding: + const EdgeInsets.only(left: 15.0, right: 10.0), + value: docsAccepted, + onChanged: (value) { + setState(() { + docsAccepted = !docsAccepted; + }); + }, + // title: Text( + // 'show_lifetime'.i18n, + // style: const TextStyle( + // color: Colors.black, + // fontWeight: FontWeight.w500, + // ), + // ), + subtitle: const Text( + 'Elfogadod a reFilc előfizetésekkel kapcsolatos Általános Szerződési Feltételeit (elérhető az alábbi link-en: filc.one/pay-terms), valamint Adatkezelési Tájékoztatónkat (elérhető az alábbi link-en: filc.one/pay-privacy)?', + textAlign: TextAlign.start, + style: TextStyle(color: Colors.black), + ), + ), + ), + // CheckboxListTile(value: false, onChanged: onChanged) + // Padding( + // padding: const EdgeInsets.symmetric(horizontal: 12.0), + // child: Text( + // 'A szolgáltatási csomag kiválasztásával (megérintés) elfogadod a reFilc előfizetésekkel kapcsolatos Általános Szerződési Feltételeit (elérhető az alábbi link-en: filc.one/pay-terms), valamint Adatkezelési Tájékoztatónkat (elérhető az alábbi link-en: filc.one/pay-privacy).', + // textAlign: TextAlign.justify, + // style: + // TextStyle(color: Colors.black.withOpacity(0.9)), + // ), + // ), // faq section const SizedBox( height: 30.0, diff --git a/refilc_mobile_ui/lib/screens/settings/settings_screen.dart b/refilc_mobile_ui/lib/screens/settings/settings_screen.dart index 70967fb..35519be 100644 --- a/refilc_mobile_ui/lib/screens/settings/settings_screen.dart +++ b/refilc_mobile_ui/lib/screens/settings/settings_screen.dart @@ -322,7 +322,7 @@ class SettingsScreenState extends State profilePictureString: user.picture, backgroundColor: Theme.of(context) .colorScheme - .secondary, //!settings.presentationMode + .tertiary, //!settings.presentationMode //? ColorUtils.stringToColor(user.displayName ?? "?") //: Theme.of(context).colorScheme.secondary, ),