diff --git a/lib/presentation/switchers/app_view.dart b/lib/presentation/switchers/app_view.dart index cc14d73..e624f5a 100644 --- a/lib/presentation/switchers/app_view.dart +++ b/lib/presentation/switchers/app_view.dart @@ -5,6 +5,7 @@ import 'package:cokut/presentation/screens/address_screen.dart'; import 'package:cokut/presentation/screens/meal_cat_screen.dart'; import 'package:cokut/presentation/screens/restaurants_list_screen.dart'; import 'package:cokut/presentation/screens/store_screen.dart'; +import 'package:cokut/presentation/widgets/settingspage/terms.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -65,6 +66,7 @@ class _AppViewState extends State { '/specials': (ctx) => MealCategoryScreen(mealType: MealType.special), '/spicey': (ctx) => MealCategoryScreen(mealType: MealType.spicey), '/address': (ctx) => AddressScreen(), + '/terms' : (ctx) => terms(), }, home: BlocBuilder( builder: (context, state) { diff --git a/lib/presentation/widgets/main/settings_page.dart b/lib/presentation/widgets/main/settings_page.dart index 742541e..bbc6f10 100644 --- a/lib/presentation/widgets/main/settings_page.dart +++ b/lib/presentation/widgets/main/settings_page.dart @@ -1,3 +1,4 @@ + import 'package:cokut/infrastructure/auth.dart'; import 'package:cokut/infrastructure/repositories/user_repo.dart'; import 'package:cokut/models/user.dart'; @@ -36,36 +37,35 @@ class Settings extends StatelessWidget { ), ), ), - buildSettingsItemTile("Address", Icons.home, onTap: () { - Navigator.of(context).pushNamed('/address'); - }), - buildSettingsItemTile("Payments", Icons.payment), - buildSettingsItemTile("Orders", Icons.event_note), - buildSettingsItemTile("Refferals", Icons.card_giftcard), - buildSettingsItemTile("Settings", Icons.settings), + buildSettingsItemTile(context,"Address", Icons.home,"address"), + buildSettingsItemTile(context,"Payments", Icons.payment,"payment"), + buildSettingsItemTile(context,"Orders", Icons.event_note,"orders"), + buildSettingsItemTile(context,"Refferals", Icons.card_giftcard,"referrals"), + buildSettingsItemTile(context,"Settings", Icons.settings,"settings"), Container( color: Colors.grey[100], height: 30, ), - buildSettingsItemTile("Terms of Service", Icons.import_contacts), - buildSettingsItemTile("Rate the app", Icons.star), - buildSettingsItemTile("About", Icons.subject), + buildSettingsItemTile(context,"Terms of Service", Icons.import_contacts,"terms"), + buildSettingsItemTile(context,"Rate the app", Icons.star,"rate"), + buildSettingsItemTile(context,"About", Icons.subject,"about"), ], ), ), ); } - ListTile buildSettingsItemTile(String content, IconData icon, - {Function onTap}) { + ListTile buildSettingsItemTile(BuildContext context,String content, IconData icon,String function) { return ListTile( - onTap: onTap, leading: Icon(icon), title: Text( content, style: TextStyle(fontWeight: FontWeight.bold), ), trailing: Icon(Icons.chevron_right), + onTap: (){ + Navigator.of(context).pushNamed("/"+function); + }, ); } -} +} \ No newline at end of file diff --git a/lib/presentation/widgets/settingspage/terms.dart b/lib/presentation/widgets/settingspage/terms.dart new file mode 100644 index 0000000..2856989 --- /dev/null +++ b/lib/presentation/widgets/settingspage/terms.dart @@ -0,0 +1,58 @@ +import 'package:flutter/material.dart'; + +class terms extends StatelessWidget{ + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + centerTitle: true, + elevation: 0, + title: Image.asset( + 'assets/images/blaksid.png', + height: 40, + ), + ), + body:SingleChildScrollView( + child: Column( + children: [ + Text("Terms and services", + style: TextStyle( + fontStyle: FontStyle.italic, + fontSize: 30, + ), + + ), + Text("Welcome to Cokut!", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 20, + ), + ), + Container( + color: Colors.white, + height: 10, + ), + Text("These terms and conditions outline the rules and regulations for the use of cokut's Application."), + Container( + color: Colors.white, + height: 10, + ), + Text("By accessing this website we assume you accept these terms and conditions. Do not continue to use Website Name if you do not agree to take all of the terms and conditions stated on this page."), + + + ], + ), + ), + backgroundColor: Colors.white, + + + + + + ); + + + } + +} \ No newline at end of file