Skip to content

Commit 3ac5f3b

Browse files
committed
Add screenshots and refactor views, routes
1 parent 35a4b4f commit 3ac5f3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+539
-361
lines changed

lib/models/indian_food.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class IndianFood {
1313
return [
1414
IndianFood(image: 'assets/images/food3.jpg', name: 'South\nIndian'),
1515
IndianFood(image: 'assets/images/food5.jpg', name: 'Indian\nChai'),
16-
IndianFood(image: 'assets/images/food1.jpg', name: 'North \nndian'),
16+
IndianFood(image: 'assets/images/food1.jpg', name: 'North \nIndian'),
1717
IndianFood(image: 'assets/images/food8.jpg', name: 'Indian\nBiryani'),
1818
IndianFood(image: 'assets/images/food9.jpg', name: 'Indian\nDosa'),
1919
IndianFood(image: 'assets/images/food4.jpg', name: 'Indian\nIdly'),

lib/models/restaurant_detail.dart

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
import 'package:flutter/foundation.dart';
2+
3+
class RestaurantDetail {
4+
final String title;
5+
final String price;
6+
final String image;
7+
final String desc;
8+
9+
RestaurantDetail({
10+
@required this.title,
11+
@required this.price,
12+
this.image = '',
13+
this.desc = '',
14+
});
15+
16+
static List<RestaurantDetail> getBreakfast() {
17+
return [
18+
RestaurantDetail(
19+
title: 'Idly(2Pcs) (Breakfast)',
20+
price: 'Rs48',
21+
image: 'assets/images/food1.jpg',
22+
desc:
23+
'A healthy breakfast item and an authentic south indian delicacy! Steamed and fluffy rice cake..more',
24+
),
25+
RestaurantDetail(
26+
title: 'Sambar Idly (2Pcs)',
27+
image: 'assets/images/food2.jpg',
28+
price: 'Rs70',
29+
),
30+
RestaurantDetail(
31+
title: 'Ghee Pongal',
32+
image: 'assets/images/food3.jpg',
33+
price: 'Rs85',
34+
desc:
35+
'Cute, button idlis with authentic. South Indian sambar and coconut chutney gives the per..more',
36+
),
37+
RestaurantDetail(
38+
title: 'Boori (1Set)',
39+
image: 'assets/images/food4.jpg',
40+
price: 'Rs85',
41+
),
42+
RestaurantDetail(
43+
title: 'Podi Idly(2Pcs)',
44+
image: 'assets/images/food5.jpg',
45+
price: 'Rs110',
46+
),
47+
RestaurantDetail(
48+
title: 'Mini Idly with Sambar',
49+
image: 'assets/images/food6.jpg',
50+
price: 'Rs85',
51+
desc:
52+
'Cute, button idlis with authentic. South Indian sambar and coconut chutney gives the per..more',
53+
),
54+
];
55+
}
56+
57+
static List<RestaurantDetail> getAllTimeFavFoods() {
58+
return [
59+
RestaurantDetail(
60+
title: 'Plain Dosa',
61+
price: 'Rs30',
62+
desc:
63+
'A healthy breakfast item and an authentic south indian delicacy!',
64+
),
65+
RestaurantDetail(
66+
title: 'Rava Dosa',
67+
price: 'Rs70',
68+
),
69+
RestaurantDetail(
70+
title: 'Onion Dosa',
71+
price: 'Rs85',
72+
desc:
73+
'Cute, button dosas with authentic. South Indian sambar and coconut chutney gives the per..more',
74+
),
75+
RestaurantDetail(
76+
title: 'Onion Uttapam',
77+
price: 'Rs85',
78+
),
79+
RestaurantDetail(
80+
title: 'Tomato Uttapam',
81+
price: 'Rs110',
82+
),
83+
RestaurantDetail(
84+
title: 'Onion Dosa & Sambar Vadai',
85+
price: 'Rs85',
86+
),
87+
];
88+
}
89+
90+
static List<RestaurantDetail> getOtherDishes() {
91+
return [
92+
RestaurantDetail(
93+
title: 'Kuzhi Paniyaram Karam (4Pcs)',
94+
price: 'Rs70',
95+
),
96+
RestaurantDetail(
97+
title: 'Kuzhi Paniyaram Sweet (4Pcs)',
98+
price: 'Rs70',
99+
),
100+
RestaurantDetail(
101+
title: 'Kuzhi Paniyaram Sweet & Karam (4Pcs)',
102+
price: 'Rs110',
103+
),
104+
RestaurantDetail(
105+
title: 'Ghee Kuzhi Paniyaram',
106+
price: 'Rs85',
107+
),
108+
];
109+
}
110+
}

lib/views/home_bottom_navigation_screen.dart

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
import 'package:flutter/material.dart';
2-
import 'package:swiggy_ui/views/swiggy/meat/meat_screen.dart';
32

43
import '../utils/app_colors.dart';
54
import 'account/account_screen.dart';
65
import 'cart/cart_screen.dart';
76
import 'search/search_screen.dart';
8-
import 'swiggy/all_restaurants/all_restaurants_screen.dart';
9-
import 'swiggy/genie/genie_screen.dart';
10-
import 'swiggy/groceries/grocery_screen.dart';
11-
import 'swiggy/offers/offer_screen.dart';
12-
import 'swiggy/restaurant_detail_screen.dart';
137
import 'swiggy/swiggy_screen.dart';
148

159
class HomeBottomNavigationScreen extends StatefulWidget {
@@ -21,7 +15,7 @@ class HomeBottomNavigationScreen extends StatefulWidget {
2115
class _HomeBottomNavigationScreenState
2216
extends State<HomeBottomNavigationScreen> {
2317
final List<Widget> _children = [
24-
RestaurantDetailScreen(),
18+
SwiggyScreen(),
2519
SearchScreen(),
2620
CartScreen(),
2721
AccountScreen(),

lib/views/swiggy/all_restaurants/all_restaurants_screen.dart

+17-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import '../../../utils/ui_helper.dart';
77
import '../../../widgets/custom_divider_view.dart';
88
import '../../../widgets/search_food_list_item_view.dart';
99
import '../groceries/grocery_screen.dart';
10-
import '../indian_delight_screen.dart';
10+
import '../indian_food/indian_delight_screen.dart';
1111
import '../offers/offer_screen.dart';
1212

1313
class AllRestaurantsScreen extends StatelessWidget {
@@ -154,20 +154,22 @@ class AllRestaurantsScreen extends StatelessWidget {
154154
}
155155

156156
class _FoodHorizontalListView extends StatelessWidget {
157+
final restaurants = AllRestaurant.getPopularBrands();
158+
157159
@override
158160
Widget build(BuildContext context) {
159161
return Container(
160162
height: MediaQuery.of(context).size.height / 4,
161163
child: ListView.builder(
162164
shrinkWrap: true,
163165
scrollDirection: Axis.horizontal,
164-
itemCount: 4,
166+
itemCount: restaurants.length,
165167
itemBuilder: (context, index) => Padding(
166168
padding: const EdgeInsets.all(10.0),
167169
child: Stack(
168170
children: <Widget>[
169171
Image.asset(
170-
'assets/images/food1.jpg',
172+
restaurants[index].image,
171173
height: MediaQuery.of(context).size.height / 4,
172174
width: MediaQuery.of(context).size.width / 2,
173175
),
@@ -179,12 +181,18 @@ class _FoodHorizontalListView extends StatelessWidget {
179181
child: Text('TRY NOW'),
180182
),
181183
Positioned(
182-
left: 10.0,
183-
bottom: 10.0,
184-
child: Text(
185-
'VEGGIE FRIENDLY\nEATERIES',
186-
style: Theme.of(context).textTheme.headline6.copyWith(
187-
color: Colors.white, fontWeight: FontWeight.bold),
184+
bottom: 1.0,
185+
child: Container(
186+
alignment: Alignment.centerLeft,
187+
padding: const EdgeInsets.symmetric(horizontal: 10.0),
188+
height: 70.0,
189+
color: Colors.black38,
190+
width: MediaQuery.of(context).size.width / 2,
191+
child: Text(
192+
restaurants[index].name,
193+
style: Theme.of(context).textTheme.headline6.copyWith(
194+
color: Colors.white, fontWeight: FontWeight.bold),
195+
),
188196
),
189197
)
190198
],

lib/views/swiggy/best_in_safety_view.dart

+59-52
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,75 @@
1-
import 'dart:math';
2-
31
import 'package:flutter/material.dart';
4-
import 'package:swiggy_ui/models/spotlight_best_top_food.dart';
5-
import 'package:swiggy_ui/utils/app_colors.dart';
6-
import 'package:swiggy_ui/utils/ui_helper.dart';
7-
import 'package:swiggy_ui/widgets/spotlight_best_top_food_item.dart';
2+
3+
import '../../models/spotlight_best_top_food.dart';
4+
import '../../utils/app_colors.dart';
5+
import '../../utils/ui_helper.dart';
6+
import '../../widgets/spotlight_best_top_food_item.dart';
87

98
class BestInSafetyViews extends StatelessWidget {
109
final restaurants = SpotlightBestTopFood.getBestRestaurants();
1110

1211
@override
1312
Widget build(BuildContext context) {
1413
return Container(
15-
margin: const EdgeInsets.all(10.0),
14+
margin: const EdgeInsets.symmetric(vertical: 10.0),
1615
height: 330.0,
1716
child: Column(
1817
crossAxisAlignment: CrossAxisAlignment.start,
1918
children: <Widget>[
20-
Row(
21-
children: <Widget>[
22-
Icon(Icons.security),
23-
UIHelper.horizontalSpaceExtraSmall(),
24-
Text(
25-
'Best in Safety',
26-
style: Theme.of(context)
27-
.textTheme
28-
.headline4
29-
.copyWith(fontSize: 20.0),
30-
),
31-
Spacer(),
32-
Row(
33-
children: <Widget>[
34-
Text(
35-
'SEE ALL',
36-
style: Theme.of(context)
37-
.textTheme
38-
.bodyText1
39-
.copyWith(fontWeight: FontWeight.bold),
40-
),
41-
UIHelper.horizontalSpaceExtraSmall(),
42-
ClipOval(
43-
child: Container(
44-
alignment: Alignment.center,
45-
color: swiggyOrange,
46-
height: 25.0,
47-
width: 25.0,
48-
child: Icon(
49-
Icons.arrow_forward_ios,
50-
size: 12.0,
51-
color: Colors.white,
52-
),
19+
Padding(
20+
padding: const EdgeInsets.symmetric(horizontal: 10.0),
21+
child: Column(
22+
crossAxisAlignment: CrossAxisAlignment.start,
23+
children: <Widget>[
24+
Row(
25+
children: <Widget>[
26+
Icon(Icons.security),
27+
UIHelper.horizontalSpaceExtraSmall(),
28+
Text(
29+
'Best in Safety',
30+
style: Theme.of(context)
31+
.textTheme
32+
.headline4
33+
.copyWith(fontSize: 20.0),
5334
),
54-
)
55-
],
56-
)
57-
],
58-
),
59-
UIHelper.verticalSpaceExtraSmall(),
60-
Text(
61-
'Restaurants with best safety standards',
62-
style: Theme.of(context)
63-
.textTheme
64-
.bodyText1
65-
.copyWith(color: Colors.grey),
35+
Spacer(),
36+
Row(
37+
children: <Widget>[
38+
Text(
39+
'SEE ALL',
40+
style: Theme.of(context)
41+
.textTheme
42+
.bodyText1
43+
.copyWith(fontWeight: FontWeight.bold),
44+
),
45+
UIHelper.horizontalSpaceExtraSmall(),
46+
ClipOval(
47+
child: Container(
48+
alignment: Alignment.center,
49+
color: swiggyOrange,
50+
height: 25.0,
51+
width: 25.0,
52+
child: Icon(
53+
Icons.arrow_forward_ios,
54+
size: 12.0,
55+
color: Colors.white,
56+
),
57+
),
58+
)
59+
],
60+
)
61+
],
62+
),
63+
UIHelper.verticalSpaceExtraSmall(),
64+
Text(
65+
'Restaurants with best safety standards',
66+
style: Theme.of(context)
67+
.textTheme
68+
.bodyText1
69+
.copyWith(color: Colors.grey),
70+
),
71+
],
72+
),
6673
),
6774
UIHelper.verticalSpaceMedium(),
6875
Flexible(

lib/views/swiggy/food_groceries_availability_view.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:swiggy_ui/utils/ui_helper.dart';
44
import 'package:swiggy_ui/views/swiggy/genie/genie_screen.dart';
55

66
import 'all_restaurants/all_restaurants_screen.dart';
7-
import 'genie_grocery_card_view.dart';
7+
import 'genie/genie_grocery_card_view.dart';
88
import 'groceries/grocery_screen.dart';
99
import 'meat/meat_screen.dart';
1010

lib/views/swiggy/genie_view.dart lib/views/swiggy/genie/genie_view.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import 'package:flutter/material.dart';
2-
import 'package:swiggy_ui/utils/app_colors.dart';
3-
import 'package:swiggy_ui/utils/ui_helper.dart';
4-
import 'package:swiggy_ui/views/swiggy/genie/genie_screen.dart';
5-
import 'package:swiggy_ui/widgets/dotted_seperator_view.dart';
2+
3+
import '../../../utils/app_colors.dart';
4+
import '../../../utils/ui_helper.dart';
5+
import '../../../widgets/dotted_seperator_view.dart';
66

77
class GenieView extends StatelessWidget {
88
@override

lib/views/swiggy/indian_delight_screen.dart lib/views/swiggy/indian_food/indian_delight_screen.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22

3-
import '../../utils/ui_helper.dart';
4-
import 'groceries/grocery_screen.dart';
3+
import '../../../utils/ui_helper.dart';
4+
import '../groceries/grocery_screen.dart';
55

66
class IndianDelightScreen extends StatelessWidget {
77
@override

lib/views/swiggy/offer_banner_view.dart lib/views/swiggy/offers/offer_banner_view.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_swiper/flutter_swiper.dart';
33

4-
import 'groceries/grocery_screen.dart';
4+
import '../groceries/grocery_screen.dart';
55

66
class OfferBannerView extends StatelessWidget {
77
final List<String> images = [

0 commit comments

Comments
 (0)