Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terms and conditions first commit #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/presentation/switchers/app_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -65,6 +66,7 @@ class _AppViewState extends State<AppView> {
'/specials': (ctx) => MealCategoryScreen(mealType: MealType.special),
'/spicey': (ctx) => MealCategoryScreen(mealType: MealType.spicey),
'/address': (ctx) => AddressScreen(),
'/terms' : (ctx) => terms(),
},
home: BlocBuilder<FirebaseAppCubit, FirebaseAppState>(
builder: (context, state) {
Expand Down
28 changes: 14 additions & 14 deletions lib/presentation/widgets/main/settings_page.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import 'package:cokut/infrastructure/auth.dart';
import 'package:cokut/infrastructure/repositories/user_repo.dart';
import 'package:cokut/models/user.dart';
Expand Down Expand Up @@ -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);
},
);
}
}
}
58 changes: 58 additions & 0 deletions lib/presentation/widgets/settingspage/terms.dart
Original file line number Diff line number Diff line change
@@ -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,





);


}

}