Untitled
plain_text
a month ago
7.6 kB
3
Indexable
Never
import 'package:flutter/material.dart'; // Voeg deze regel toe voor de aangepaste symbolen class CalmifyPaywall extends StatefulWidget { const CalmifyPaywall({super.key}); @override _CalmifyPaywallState createState() => _CalmifyPaywallState(); } class _CalmifyPaywallState extends State<CalmifyPaywall> { Widget _buildStepWidget(String title, String description, bool isInstalled) { return Row( children: [ if (isInstalled) ...[ const Icon(Icons.check, color: Color(0xFF61CAD9)), const SizedBox(width: 12), Text( title, style: const TextStyle( color: Color(0xFF353743), fontSize: 16, fontWeight: FontWeight.bold, decoration: TextDecoration.lineThrough, ), ), ] else ...[ const Icon(Icons.check_circle, color: Color(0xFFBCDDEB)), const SizedBox(width: 12), Text( title, style: const TextStyle( color: Color(0xFF353743), fontSize: 16, fontWeight: FontWeight.bold, ), ), ], const SizedBox(width: 12), Expanded( child: Text( description, style: const TextStyle( color: Color(0xFF353743), fontSize: 16, ), ), ), ], ); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text("Calmify Paywall"), ), body: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ // Hier kun je andere widgets toevoegen const Text("Welcome to Calmify Paywall"), ElevatedButton( onPressed: () { // Voeg hier de logica toe voor de knop }, child: const Text("Start Free Trial"), ), ], ), ); } } class PaywallScreen extends StatelessWidget { const PaywallScreen({super.key}); get import => null; get package => null; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: const Color(0xFFBCDDEB), body: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Row( mainAxisAlignment: MainAxisAlignment.end, children: [ IconButton( icon: const Icon(Icons.close), onPressed: () { // Navigeer naar het beginscherm (HomeScreen) Navigator.pop(context); }, ), ], ), const Text( 'Free full access to Calmify', style: TextStyle( fontSize: 24, color: Color(0xFF353743), fontWeight: FontWeight.bold, ), ), const SizedBox(height: 20), import 'package:flutter/material.dart'; class VinkjeSymbol extends StatelessWidget { // ... (rest of the VinkjeSymbol class) } class SlotSymbol extends StatelessWidget { // ... (rest of the SlotSymbol class) } class NotificationSymbol extends StatelessWidget { // ... (rest of the NotificationSymbol class) } class StarSymbol extends StatelessWidget { // ... (rest of the StarSymbol class) } class PathElement extends StatelessWidget { final Widget symbol; final String title; final String subtitle; PathElement({ required this.symbol, required this.title, required this.subtitle, }); @override Widget build(BuildContext context) { return Row( children: [ symbol, SizedBox(width: 10), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ // ... rest of your PathElement content ... ], ), ], ); } } class CalmifyPaywall extends StatefulWidget { // ... (rest of the CalmifyPaywall class) } class _CalmifyPaywallState extends State<CalmifyPaywall> { // ... (rest of the _CalmifyPaywallState class) } class PaywallScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Color(0xFFBCDDEB), body: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ // ... other widgets ... PathElement( symbol: VinkjeSymbol(), title: 'Install Calmify', subtitle: 'The first step in your journey', ), PathElement( symbol: SlotSymbol(), title: 'Today', subtitle: 'Get instant access to see how Calmify changes your life', ), PathElement( symbol: NotificationSymbol(), title: 'Day 5', subtitle: 'We\'ll remind you with a notification that your trial is ending', ), PathElement( symbol: StarSymbol(), title: 'Day 7', subtitle: 'Try 7 days for free, then €59,99 / year.\nNo commitment. Cancel anytime.', ), ], ), ); } } class HomeScreen extends StatelessWidget { // ... (rest of the HomeScreen class) } void main() { runApp(MaterialApp( home: PaywallScreen(), )); } PathElement( symbol: VinkjeSymbol(), title: 'Install Calmify', subtitle: 'The first step in your journey', ), PathElement( symbol: SlotSymbol(), title: 'Today', subtitle: 'Get instant access to see how Calmify changes your life', ), PathElement( symbol: NotificationSymbol(), title: 'Day 5', subtitle: 'We\'ll remind you with a notification that your trial is ending', ), PathElement( symbol: StarSymbol(), title: 'Day 7', subtitle: 'Try 7 days for free, then €59,99 / year.\nNo commitment. Cancel anytime.', ), SizedBox(height: 20), ElevatedButton( onPressed: () { // Navigeer naar het volgende scherm (bijv. Beginscherm) Navigator.push( context, MaterialPageRoute(builder: (context) => HomeScreen()), ); }, style: ElevatedButton.styleFrom( primary: Color(0xFF61CAD9), onPrimary: Colors.white, ), child: Text('Start my free trial week'), ), SizedBox(height: 10), TextButton( onPressed: () { // Navigeer naar het volgende scherm (bijv. Beginscherm) Navigator.push( context, MaterialPageRoute(builder: (context) => HomeScreen()), ); }, child: Text( 'No payment now', style: TextStyle(color: Color(0xFF353743)), ), ), ], ), ); } } // De rest van je code voor de symbolen blijft hetzelfde class HomeScreen extends StatelessWidget { const HomeScreen({super.key}); @override Widget build(BuildContext context) { // Hier kan je de inhoud van het beginscherm definiëren return const Scaffold( backgroundColor: Color(0xFFBCDDEB), // Voeg hier de inhoud van het beginscherm toe ); } } void main() { runApp(const MaterialApp( home: PaywallScreen(), )); }