Skip to content

Commit

Permalink
Add screenshots and refactor views, routes
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothvino42 committed Jul 26, 2020
1 parent 35a4b4f commit 3ac5f3b
Show file tree
Hide file tree
Showing 44 changed files with 539 additions and 361 deletions.
2 changes: 1 addition & 1 deletion lib/models/indian_food.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class IndianFood {
return [
IndianFood(image: 'assets/images/food3.jpg', name: 'South\nIndian'),
IndianFood(image: 'assets/images/food5.jpg', name: 'Indian\nChai'),
IndianFood(image: 'assets/images/food1.jpg', name: 'North \nndian'),
IndianFood(image: 'assets/images/food1.jpg', name: 'North \nIndian'),
IndianFood(image: 'assets/images/food8.jpg', name: 'Indian\nBiryani'),
IndianFood(image: 'assets/images/food9.jpg', name: 'Indian\nDosa'),
IndianFood(image: 'assets/images/food4.jpg', name: 'Indian\nIdly'),
Expand Down
110 changes: 110 additions & 0 deletions lib/models/restaurant_detail.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import 'package:flutter/foundation.dart';

class RestaurantDetail {
final String title;
final String price;
final String image;
final String desc;

RestaurantDetail({
@required this.title,
@required this.price,
this.image = '',
this.desc = '',
});

static List<RestaurantDetail> getBreakfast() {
return [
RestaurantDetail(
title: 'Idly(2Pcs) (Breakfast)',
price: 'Rs48',
image: 'assets/images/food1.jpg',
desc:
'A healthy breakfast item and an authentic south indian delicacy! Steamed and fluffy rice cake..more',
),
RestaurantDetail(
title: 'Sambar Idly (2Pcs)',
image: 'assets/images/food2.jpg',
price: 'Rs70',
),
RestaurantDetail(
title: 'Ghee Pongal',
image: 'assets/images/food3.jpg',
price: 'Rs85',
desc:
'Cute, button idlis with authentic. South Indian sambar and coconut chutney gives the per..more',
),
RestaurantDetail(
title: 'Boori (1Set)',
image: 'assets/images/food4.jpg',
price: 'Rs85',
),
RestaurantDetail(
title: 'Podi Idly(2Pcs)',
image: 'assets/images/food5.jpg',
price: 'Rs110',
),
RestaurantDetail(
title: 'Mini Idly with Sambar',
image: 'assets/images/food6.jpg',
price: 'Rs85',
desc:
'Cute, button idlis with authentic. South Indian sambar and coconut chutney gives the per..more',
),
];
}

static List<RestaurantDetail> getAllTimeFavFoods() {
return [
RestaurantDetail(
title: 'Plain Dosa',
price: 'Rs30',
desc:
'A healthy breakfast item and an authentic south indian delicacy!',
),
RestaurantDetail(
title: 'Rava Dosa',
price: 'Rs70',
),
RestaurantDetail(
title: 'Onion Dosa',
price: 'Rs85',
desc:
'Cute, button dosas with authentic. South Indian sambar and coconut chutney gives the per..more',
),
RestaurantDetail(
title: 'Onion Uttapam',
price: 'Rs85',
),
RestaurantDetail(
title: 'Tomato Uttapam',
price: 'Rs110',
),
RestaurantDetail(
title: 'Onion Dosa & Sambar Vadai',
price: 'Rs85',
),
];
}

static List<RestaurantDetail> getOtherDishes() {
return [
RestaurantDetail(
title: 'Kuzhi Paniyaram Karam (4Pcs)',
price: 'Rs70',
),
RestaurantDetail(
title: 'Kuzhi Paniyaram Sweet (4Pcs)',
price: 'Rs70',
),
RestaurantDetail(
title: 'Kuzhi Paniyaram Sweet & Karam (4Pcs)',
price: 'Rs110',
),
RestaurantDetail(
title: 'Ghee Kuzhi Paniyaram',
price: 'Rs85',
),
];
}
}
8 changes: 1 addition & 7 deletions lib/views/home_bottom_navigation_screen.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import 'package:flutter/material.dart';
import 'package:swiggy_ui/views/swiggy/meat/meat_screen.dart';

import '../utils/app_colors.dart';
import 'account/account_screen.dart';
import 'cart/cart_screen.dart';
import 'search/search_screen.dart';
import 'swiggy/all_restaurants/all_restaurants_screen.dart';
import 'swiggy/genie/genie_screen.dart';
import 'swiggy/groceries/grocery_screen.dart';
import 'swiggy/offers/offer_screen.dart';
import 'swiggy/restaurant_detail_screen.dart';
import 'swiggy/swiggy_screen.dart';

class HomeBottomNavigationScreen extends StatefulWidget {
Expand All @@ -21,7 +15,7 @@ class HomeBottomNavigationScreen extends StatefulWidget {
class _HomeBottomNavigationScreenState
extends State<HomeBottomNavigationScreen> {
final List<Widget> _children = [
RestaurantDetailScreen(),
SwiggyScreen(),
SearchScreen(),
CartScreen(),
AccountScreen(),
Expand Down
26 changes: 17 additions & 9 deletions lib/views/swiggy/all_restaurants/all_restaurants_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '../../../utils/ui_helper.dart';
import '../../../widgets/custom_divider_view.dart';
import '../../../widgets/search_food_list_item_view.dart';
import '../groceries/grocery_screen.dart';
import '../indian_delight_screen.dart';
import '../indian_food/indian_delight_screen.dart';
import '../offers/offer_screen.dart';

class AllRestaurantsScreen extends StatelessWidget {
Expand Down Expand Up @@ -154,20 +154,22 @@ class AllRestaurantsScreen extends StatelessWidget {
}

class _FoodHorizontalListView extends StatelessWidget {
final restaurants = AllRestaurant.getPopularBrands();

@override
Widget build(BuildContext context) {
return Container(
height: MediaQuery.of(context).size.height / 4,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemCount: 4,
itemCount: restaurants.length,
itemBuilder: (context, index) => Padding(
padding: const EdgeInsets.all(10.0),
child: Stack(
children: <Widget>[
Image.asset(
'assets/images/food1.jpg',
restaurants[index].image,
height: MediaQuery.of(context).size.height / 4,
width: MediaQuery.of(context).size.width / 2,
),
Expand All @@ -179,12 +181,18 @@ class _FoodHorizontalListView extends StatelessWidget {
child: Text('TRY NOW'),
),
Positioned(
left: 10.0,
bottom: 10.0,
child: Text(
'VEGGIE FRIENDLY\nEATERIES',
style: Theme.of(context).textTheme.headline6.copyWith(
color: Colors.white, fontWeight: FontWeight.bold),
bottom: 1.0,
child: Container(
alignment: Alignment.centerLeft,
padding: const EdgeInsets.symmetric(horizontal: 10.0),
height: 70.0,
color: Colors.black38,
width: MediaQuery.of(context).size.width / 2,
child: Text(
restaurants[index].name,
style: Theme.of(context).textTheme.headline6.copyWith(
color: Colors.white, fontWeight: FontWeight.bold),
),
),
)
],
Expand Down
111 changes: 59 additions & 52 deletions lib/views/swiggy/best_in_safety_view.dart
Original file line number Diff line number Diff line change
@@ -1,68 +1,75 @@
import 'dart:math';

import 'package:flutter/material.dart';
import 'package:swiggy_ui/models/spotlight_best_top_food.dart';
import 'package:swiggy_ui/utils/app_colors.dart';
import 'package:swiggy_ui/utils/ui_helper.dart';
import 'package:swiggy_ui/widgets/spotlight_best_top_food_item.dart';

import '../../models/spotlight_best_top_food.dart';
import '../../utils/app_colors.dart';
import '../../utils/ui_helper.dart';
import '../../widgets/spotlight_best_top_food_item.dart';

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

@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.all(10.0),
margin: const EdgeInsets.symmetric(vertical: 10.0),
height: 330.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Icon(Icons.security),
UIHelper.horizontalSpaceExtraSmall(),
Text(
'Best in Safety',
style: Theme.of(context)
.textTheme
.headline4
.copyWith(fontSize: 20.0),
),
Spacer(),
Row(
children: <Widget>[
Text(
'SEE ALL',
style: Theme.of(context)
.textTheme
.bodyText1
.copyWith(fontWeight: FontWeight.bold),
),
UIHelper.horizontalSpaceExtraSmall(),
ClipOval(
child: Container(
alignment: Alignment.center,
color: swiggyOrange,
height: 25.0,
width: 25.0,
child: Icon(
Icons.arrow_forward_ios,
size: 12.0,
color: Colors.white,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Icon(Icons.security),
UIHelper.horizontalSpaceExtraSmall(),
Text(
'Best in Safety',
style: Theme.of(context)
.textTheme
.headline4
.copyWith(fontSize: 20.0),
),
)
],
)
],
),
UIHelper.verticalSpaceExtraSmall(),
Text(
'Restaurants with best safety standards',
style: Theme.of(context)
.textTheme
.bodyText1
.copyWith(color: Colors.grey),
Spacer(),
Row(
children: <Widget>[
Text(
'SEE ALL',
style: Theme.of(context)
.textTheme
.bodyText1
.copyWith(fontWeight: FontWeight.bold),
),
UIHelper.horizontalSpaceExtraSmall(),
ClipOval(
child: Container(
alignment: Alignment.center,
color: swiggyOrange,
height: 25.0,
width: 25.0,
child: Icon(
Icons.arrow_forward_ios,
size: 12.0,
color: Colors.white,
),
),
)
],
)
],
),
UIHelper.verticalSpaceExtraSmall(),
Text(
'Restaurants with best safety standards',
style: Theme.of(context)
.textTheme
.bodyText1
.copyWith(color: Colors.grey),
),
],
),
),
UIHelper.verticalSpaceMedium(),
Flexible(
Expand Down
2 changes: 1 addition & 1 deletion lib/views/swiggy/food_groceries_availability_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:swiggy_ui/utils/ui_helper.dart';
import 'package:swiggy_ui/views/swiggy/genie/genie_screen.dart';

import 'all_restaurants/all_restaurants_screen.dart';
import 'genie_grocery_card_view.dart';
import 'genie/genie_grocery_card_view.dart';
import 'groceries/grocery_screen.dart';
import 'meat/meat_screen.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:swiggy_ui/utils/app_colors.dart';
import 'package:swiggy_ui/utils/ui_helper.dart';
import 'package:swiggy_ui/views/swiggy/genie/genie_screen.dart';
import 'package:swiggy_ui/widgets/dotted_seperator_view.dart';

import '../../../utils/app_colors.dart';
import '../../../utils/ui_helper.dart';
import '../../../widgets/dotted_seperator_view.dart';

class GenieView extends StatelessWidget {
@override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';

import '../../utils/ui_helper.dart';
import 'groceries/grocery_screen.dart';
import '../../../utils/ui_helper.dart';
import '../groceries/grocery_screen.dart';

class IndianDelightScreen extends StatelessWidget {
@override
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';

import 'groceries/grocery_screen.dart';
import '../groceries/grocery_screen.dart';

class OfferBannerView extends StatelessWidget {
final List<String> images = [
Expand Down
Loading

0 comments on commit 3ac5f3b

Please sign in to comment.