Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"C:\\\\Users\\\\falcon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.18\\\\","dependencies":[]}],"android":[{"name":"path_provider","path":"C:\\\\Users\\\\falcon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.18\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"C:\\\\Users\\\\falcon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-0.0.4+4\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\falcon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-0.0.1+2\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\falcon\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-0.0.4+1\\\\","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2020-10-02 20:01:13.335328","version":"1.22.0"}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
15 changes: 15 additions & 0 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Projects\FlutterFoodybite"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=C:\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ class _MyAppState extends State<MyApp> {
);
}
}
//TODO make the product_screen page(hero animation)
2 changes: 1 addition & 1 deletion lib/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Home extends StatelessWidget {
),
FlatButton(
child: Text(
"See all (9)",
"See all (${category.length})",
style: TextStyle(
color: Theme.of(context).accentColor,
),
Expand Down
111 changes: 111 additions & 0 deletions lib/screens/trending_restaurants_details.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import 'package:flutter/material.dart';
import 'package:flutter_foodybite/util/categories.dart';
import 'package:google_fonts/google_fonts.dart';

class ProductScreen extends StatefulWidget {
final String img;
final String title;
final String address;
final String rating;

ProductScreen({
Key key,
@required this.img,
@required this.title,
@required this.address,
@required this.rating,
}) : super(key: key);
@override
_ProductScreenState createState() => _ProductScreenState();
}

class _ProductScreenState extends State<ProductScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0.0,
leading: IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: Icon(Icons.arrow_back)),
centerTitle: true,
),
body: Container(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: Image.asset('${widget.img}'),
),
SizedBox(
height: 10,
),
Text(
'${widget.title}',
style: GoogleFonts.poppins(
fontSize: 24, fontWeight: FontWeight.bold),
),
SizedBox(
height: 10,
),
Row(
children: [
Icon(
Icons.location_on_outlined,
color: Colors.amber,
),
SizedBox(
width: 5,
),
Flexible(
child: Text(
'${widget.address}',
style: GoogleFonts.poppins(fontSize: 16),
),
),
],
),
SizedBox(
height: 10,
),
Text('Popular Food',
style: GoogleFonts.poppins(
fontSize: 18, fontWeight: FontWeight.w700)),
Expanded(
child: Container(
child: GridView.count(
crossAxisCount: 2,
children: List.generate(categories.length, (index) {
return Container(
child: Card(
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image:
AssetImage('${categories[index]['img']}'),
fit: BoxFit.fitHeight),
),
child: Text(
'${categories[index]['name']}',
style: GoogleFonts.poppins(
color: Colors.red.shade700,
fontSize: 16,
fontWeight: FontWeight.w700),
),
),
),
);
}),
),
))
],
),
),
),
);
}
}
188 changes: 101 additions & 87 deletions lib/widgets/trending_item.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_foodybite/screens/trending_restaurants_details.dart';
import 'package:flutter_foodybite/util/const.dart';

class TrendingItem extends StatefulWidget {
Expand All @@ -24,109 +25,122 @@ class _TrendingItemState extends State<TrendingItem> {
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(top: 5.0, bottom: 5.0),
child: Container(
height: MediaQuery.of(context).size.height / 2.5,
width: MediaQuery.of(context).size.width,
child: Card(
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
elevation: 3.0,
child: Column(
children: <Widget>[
Stack(
children: <Widget>[
Container(
height: MediaQuery.of(context).size.height / 3.5,
width: MediaQuery.of(context).size.width,
child: ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
),
child: Image.asset(
"${widget.img}",
fit: BoxFit.cover,
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ProductScreen(
img: widget.img,
address: widget.address,
rating: widget.rating,
title: widget.title,
)));
},
child: Container(
height: MediaQuery.of(context).size.height / 2.5,
width: MediaQuery.of(context).size.width,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)),
elevation: 3.0,
child: Column(
children: <Widget>[
Stack(
children: <Widget>[
Container(
height: MediaQuery.of(context).size.height / 3.5,
width: MediaQuery.of(context).size.width,
child: ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
),
child: Image.asset(
"${widget.img}",
fit: BoxFit.cover,
),
),
),
),
Positioned(
top: 6.0,
right: 6.0,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4.0)),
child: Padding(
padding: EdgeInsets.all(2.0),
child: Row(
children: <Widget>[
Icon(
Icons.star,
color: Constants.ratingBG,
size: 10.0,
),
Text(
" ${widget.rating} ",
style: TextStyle(
fontSize: 10.0,
Positioned(
top: 6.0,
right: 6.0,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4.0)),
child: Padding(
padding: EdgeInsets.all(2.0),
child: Row(
children: <Widget>[
Icon(
Icons.star,
color: Constants.ratingBG,
size: 10.0,
),
),
],
Text(
" ${widget.rating} ",
style: TextStyle(
fontSize: 10.0,
),
),
],
),
),
),
),
),
Positioned(
top: 6.0,
left: 6.0,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(3.0)),
child: Padding(
padding: EdgeInsets.all(4.0),
child: Text(
" OPEN ",
style: TextStyle(
fontSize: 10.0,
color: Colors.green,
fontWeight: FontWeight.bold,
Positioned(
top: 6.0,
left: 6.0,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(3.0)),
child: Padding(
padding: EdgeInsets.all(4.0),
child: Text(
" OPEN ",
style: TextStyle(
fontSize: 10.0,
color: Colors.green,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
],
),
SizedBox(height: 7.0),
Padding(
padding: EdgeInsets.only(left: 15.0),
child: Container(
width: MediaQuery.of(context).size.width,
child: Text(
"${widget.title}",
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w800,
],
),
SizedBox(height: 7.0),
Padding(
padding: EdgeInsets.only(left: 15.0),
child: Container(
width: MediaQuery.of(context).size.width,
child: Text(
"${widget.title}",
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w800,
),
textAlign: TextAlign.left,
),
textAlign: TextAlign.left,
),
),
),
SizedBox(height: 7.0),
Padding(
padding: EdgeInsets.only(left: 15.0),
child: Container(
width: MediaQuery.of(context).size.width,
child: Text(
"${widget.address}",
style: TextStyle(
fontSize: 12.0,
fontWeight: FontWeight.w300,
SizedBox(height: 7.0),
Padding(
padding: EdgeInsets.only(left: 15.0),
child: Container(
width: MediaQuery.of(context).size.width,
child: Text(
"${widget.address}",
style: TextStyle(
fontSize: 12.0,
fontWeight: FontWeight.w300,
),
),
),
),
),
SizedBox(height: 10.0),
],
SizedBox(height: 10.0),
],
),
),
),
),
Expand Down
Loading