diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies new file mode 100644 index 0000000..708c0e3 --- /dev/null +++ b/.flutter-plugins-dependencies @@ -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-03 00:00:03.138668","version":"1.22.0"} \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties index 8bd86f6..7be3d8b 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1 +1,2 @@ org.gradle.jvmargs=-Xmx1536M +android.enableR8=true diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh new file mode 100644 index 0000000..52e75bf --- /dev/null +++ b/ios/Flutter/flutter_export_environment.sh @@ -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" diff --git a/lib/screens/home.dart b/lib/screens/home.dart index 1bcd6a0..d082d6e 100644 --- a/lib/screens/home.dart +++ b/lib/screens/home.dart @@ -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, ), diff --git a/lib/screens/trending_restaurants_details.dart b/lib/screens/trending_restaurants_details.dart new file mode 100644 index 0000000..9efce33 --- /dev/null +++ b/lib/screens/trending_restaurants_details.dart @@ -0,0 +1,104 @@ +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 { + @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, vertical: 10), + 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.star, + color: Colors.amber, + size: 18, + ), + Text('${widget.rating}'), + ], + ), + SizedBox( + height: 20, + ), + 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), + ), + ), + ), + ); + }), + ), + )) + ], + ), + ), + ), + ); + } +} diff --git a/lib/widgets/trending_item.dart b/lib/widgets/trending_item.dart index 9702db3..47d00de 100644 --- a/lib/widgets/trending_item.dart +++ b/lib/widgets/trending_item.dart @@ -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 { @@ -24,109 +25,122 @@ class _TrendingItemState extends State { 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: [ - Stack( - children: [ - 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: [ + Stack( + children: [ + 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: [ - 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: [ + 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), + ], + ), ), ), ), diff --git a/pubspec.lock b/pubspec.lock index 62df70f..cdc79d3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,48 +1,48 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - archive: + async: dependency: transitive description: - name: archive + name: async url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" - args: + version: "2.5.0-nullsafety.1" + boolean_selector: dependency: transitive description: - name: args + name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.6.0" - async: + version: "2.1.0-nullsafety.1" + characters: dependency: transitive description: - name: async + name: characters url: "https://pub.dartlang.org" source: hosted - version: "2.4.1" - boolean_selector: + version: "1.1.0-nullsafety.3" + charcode: dependency: transitive description: - name: boolean_selector + name: charcode url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" - charcode: + version: "1.2.0-nullsafety.1" + clock: dependency: transitive description: - name: charcode + name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.1.0-nullsafety.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.12" + version: "1.15.0-nullsafety.3" convert: dependency: transitive description: @@ -56,7 +56,7 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.5" cupertino_icons: dependency: "direct main" description: @@ -64,6 +64,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.2" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0-nullsafety.1" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "5.2.1" flutter: dependency: "direct main" description: flutter @@ -74,48 +95,118 @@ packages: description: flutter source: sdk version: "0.0.0" - image: + google_fonts: + dependency: "direct main" + description: + name: google_fonts + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + http: dependency: transitive description: - name: image + name: http url: "https://pub.dartlang.org" source: hosted - version: "2.1.12" + version: "0.12.2" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.4" + intl: + dependency: transitive + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.1" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.6" + version: "0.12.10-nullsafety.1" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.8" + version: "1.3.0-nullsafety.3" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" - petitparser: + version: "1.8.0-nullsafety.1" + path_provider: + dependency: transitive + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.18" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+2" + path_provider_macos: dependency: transitive description: - name: petitparser + name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.4.0" - quiver: + version: "0.0.4+4" + path_provider_platform_interface: dependency: transitive description: - name: quiver + name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "1.0.3" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4+1" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.2" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.13" sky_engine: dependency: transitive description: flutter @@ -127,62 +218,70 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0-nullsafety.2" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.1" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0-nullsafety.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0-nullsafety.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.15" + version: "0.2.19-nullsafety.2" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0-nullsafety.3" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" - xml: + version: "2.1.0-nullsafety.3" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.3" + xdg_directories: dependency: transitive description: - name: xml + name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "3.6.1" + version: "0.1.2" sdks: - dart: ">=2.6.0 <3.0.0" + dart: ">=2.10.0-110 <2.11.0" + flutter: ">=1.17.0 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 92df891..63f12b4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,6 +23,8 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 + google_fonts: ^1.1.0 + dev_dependencies: flutter_test: diff --git a/ss/new_screen.png b/ss/new_screen.png new file mode 100644 index 0000000..4f0a8a9 Binary files /dev/null and b/ss/new_screen.png differ