Skip to content
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: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
2 changes: 1 addition & 1 deletion lib/animation/RotationRoute.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class RotationRoute extends PageRouteBuilder {
final Widget page;

RotationRoute({this.page})
RotationRoute({required this.page})
: super(
pageBuilder: (
BuildContext context,
Expand Down
2 changes: 1 addition & 1 deletion lib/animation/ScaleRoute.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
class ScaleRoute extends PageRouteBuilder {
final Widget page;

ScaleRoute({this.page})
ScaleRoute({required this.page})
: super(
pageBuilder: (
BuildContext context,
Expand Down
4 changes: 0 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_app/pages/FoodDetailsPage.dart';
import 'package:flutter_app/pages/FoodOrderPage.dart';
import 'package:flutter_app/pages/HomePage.dart';
import 'package:flutter_app/pages/SignInPage.dart';
import 'package:flutter_app/pages/SignUpPage.dart';

void main() => runApp(MaterialApp(
debugShowCheckedModeBanner: false,
Expand Down
18 changes: 9 additions & 9 deletions lib/pages/FoodDetailsPage.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_app/animation/ScaleRoute.dart';
import 'package:flutter_app/pages/FoodOrderPage.dart';
import 'package:flutter_app/widgets/FoodDetailsSlider.dart';

class FoodDetailsPage extends StatefulWidget {
@override
Expand All @@ -25,7 +25,7 @@ class _FoodDetailsPageState extends State<FoodDetailsPage> {
),
onPressed: () => Navigator.of(context).pop(),
),
brightness: Brightness.light,
systemOverlayStyle: SystemUiOverlayStyle.light,
actions: <Widget>[
IconButton(
icon: Icon(
Expand Down Expand Up @@ -121,15 +121,15 @@ class _FoodDetailsPageState extends State<FoodDetailsPage> {
}

class FoodTitleWidget extends StatelessWidget {
String productName;
String productPrice;
String productHost;
final String productName;
final String productPrice;
final String productHost;

FoodTitleWidget({
Key key,
@required this.productName,
@required this.productPrice,
@required this.productHost,
Key? key,
required this.productName,
required this.productPrice,
required this.productHost,
}) : super(key: key);

@override
Expand Down
26 changes: 13 additions & 13 deletions lib/pages/FoodOrderPage.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';

class FoodOrderPage extends StatefulWidget {
@override
Expand Down Expand Up @@ -32,7 +32,7 @@ class _FoodOrderPageState extends State<FoodOrderPage> {
textAlign: TextAlign.center,
),
),
brightness: Brightness.light,
systemOverlayStyle: SystemUiOverlayStyle.light,
actions: <Widget>[
CartIconWithBadge(),
],
Expand Down Expand Up @@ -303,17 +303,17 @@ class PromoCodeWidget extends StatelessWidget {
}

class CartItem extends StatelessWidget {
String productName;
String productPrice;
String productImage;
String productCartQuantity;
final String productName;
final String productPrice;
final String productImage;
final String productCartQuantity;

CartItem({
Key key,
@required this.productName,
@required this.productPrice,
@required this.productImage,
@required this.productCartQuantity,
Key? key,
required this.productName,
required this.productPrice,
required this.productImage,
required this.productCartQuantity,
}) : super(key: key);

@override
Expand Down Expand Up @@ -420,7 +420,7 @@ class CartItem extends StatelessWidget {
}

class CartIconWithBadge extends StatelessWidget {
int counter = 3;
final int counter = 3;

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -463,7 +463,7 @@ class CartIconWithBadge extends StatelessWidget {
}

class AddToCartMenu extends StatelessWidget {
int productCounter;
final int productCounter;

AddToCartMenu(this.productCounter);

Expand Down
3 changes: 2 additions & 1 deletion lib/pages/HomePage.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_app/animation/ScaleRoute.dart';
import 'package:flutter_app/pages/SignInPage.dart';
import 'package:flutter_app/widgets/BestFoodWidget.dart';
Expand All @@ -25,7 +26,7 @@ class _HomePageState extends State<HomePage> {
fontSize: 16,
fontWeight: FontWeight.w500),
),
brightness: Brightness.light,
systemOverlayStyle: SystemUiOverlayStyle.light,
actions: <Widget>[
IconButton(
icon: Icon(
Expand Down
2 changes: 0 additions & 2 deletions lib/pages/SignInPage.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_app/animation/ScaleRoute.dart';
import 'package:flutter_app/pages/FoodDetailsPage.dart';
import 'package:flutter_app/pages/SignUpPage.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

Expand Down
26 changes: 13 additions & 13 deletions lib/widgets/BestFoodWidget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ class BestFoodTitle extends StatelessWidget {
}

class BestFoodTiles extends StatelessWidget {
String name;
String imageUrl;
String rating;
String numberOfRating;
String price;
String slug;
final String name;
final String imageUrl;
final String rating;
final String numberOfRating;
final String price;
final String slug;

BestFoodTiles(
{Key key,
@required this.name,
@required this.imageUrl,
@required this.rating,
@required this.numberOfRating,
@required this.price,
@required this.slug})
{Key? key,
required this.name,
required this.imageUrl,
required this.rating,
required this.numberOfRating,
required this.price,
required this.slug})
: super(key: key);

@override
Expand Down
20 changes: 4 additions & 16 deletions lib/widgets/BottomNavBarWidget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,19 @@ class _BottomNavBarWidgetState extends State<BottomNavBarWidget> {
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.home),
title: Text(
'Home',
style: TextStyle(color: Color(0xFF2c2b2b)),
),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.near_me),
title: Text(
'Near By',
style: TextStyle(color: Color(0xFF2c2b2b)),
),
label: 'Near By',
),
BottomNavigationBarItem(
icon: Icon(Icons.card_giftcard),
title: Text(
'Cart',
style: TextStyle(color: Color(0xFF2c2b2b)),
),
label: 'Cart',
),
BottomNavigationBarItem(
icon: Icon(FontAwesomeIcons.user),
title: Text(
'Account',
style: TextStyle(color: Color(0xFF2c2b2b)),
),
label: 'Account',
),
],
currentIndex: _selectedIndex,
Expand Down
59 changes: 25 additions & 34 deletions lib/widgets/FoodDetailsSlider.dart
Original file line number Diff line number Diff line change
@@ -1,49 +1,40 @@
import 'package:carousel_pro/carousel_pro.dart';
import 'package:another_carousel_pro/another_carousel_pro.dart';
import 'package:flutter/material.dart';

class FoodDetailsSlider extends StatelessWidget {
String slideImage1;
String slideImage2;
String slideImage3;
final String slideImage1;
final String slideImage2;
final String slideImage3;

FoodDetailsSlider(
{Key key,
@required this.slideImage1,
@required this.slideImage2,
@required this.slideImage3})
{Key? key,
required this.slideImage1,
required this.slideImage2,
required this.slideImage3})
: super(key: key);

@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(left: 10, right: 10),
child: Container(
child: Carousel(
images: [
Image.asset(
slideImage1,
),
/* Image.asset(
slideImage2,
height: double.infinity,
width: double.infinity,
),
Image.asset(
slideImage3,
height: double.infinity,
width: double.infinity,
),*/
],
dotSize: 4.0,
dotSpacing: 15.0,
dotColor: Colors.purple,
indicatorBgPadding: 5.0,
dotBgColor: Colors.black54.withOpacity(0),
borderRadius: true,
radius: Radius.circular(20),
moveIndicatorFromBottom: 180.0,
noRadiusForIndicator: true,
)),
child: AnotherCarousel(
images: [
Image.asset(slideImage1),
// Uncomment and include these if you have more images
// Image.asset(slideImage2),
// Image.asset(slideImage3),
],
dotSize: 4.0,
dotSpacing: 15.0,
dotColor: Colors.purple,
indicatorBgPadding: 5.0,
dotBgColor: Colors.black54.withOpacity(0),
borderRadius: true,
radius: const Radius.circular(20),
moveIndicatorFromBottom: 180.0,
noRadiusForIndicator: true,
)),
);
}
}
27 changes: 13 additions & 14 deletions lib/widgets/PopularFoodsWidget.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter_app/animation/RotationRoute.dart';
import 'package:flutter_app/animation/ScaleRoute.dart';
import 'package:flutter_app/pages/FoodDetailsPage.dart';

Expand Down Expand Up @@ -27,21 +26,21 @@ class _PopularFoodsWidgetState extends State<PopularFoodsWidget> {
}

class PopularFoodTiles extends StatelessWidget {
String name;
String imageUrl;
String rating;
String numberOfRating;
String price;
String slug;
final String name;
final String imageUrl;
final String rating;
final String numberOfRating;
final String price;
final String slug;

PopularFoodTiles(
{Key key,
@required this.name,
@required this.imageUrl,
@required this.rating,
@required this.numberOfRating,
@required this.price,
@required this.slug})
{Key? key,
required this.name,
required this.imageUrl,
required this.rating,
required this.numberOfRating,
required this.price,
required this.slug})
: super(key: key);

@override
Expand Down
Loading