├── android ├── settings_aar.gradle ├── gradle.properties ├── .gitignore ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values │ │ │ │ │ ├── string.xml │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── java │ │ │ │ └── app │ │ │ │ │ └── delivery │ │ │ │ │ └── project │ │ │ │ │ └── delivery_app │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── google-services.json │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── AppDelegate.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── main.m │ ├── AppDelegate.m │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcworkspace │ └── contents.xcworkspacedata ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme └── .gitignore ├── prototype_screens ├── Cart Screen.png ├── Home Screen.png ├── Login Screen.png ├── Order Screeen.png └── Food Info Screen.png ├── lib ├── assets │ ├── images │ │ ├── icons │ │ │ ├── boi-icon.png │ │ │ ├── geleia-icon.png │ │ │ ├── porco-icon.png │ │ │ ├── facebook-icon.png │ │ │ └── galinha-icon.png │ │ └── background │ │ │ ├── login.png │ │ │ ├── accepted.png │ │ │ ├── barbecue.png │ │ │ ├── male-avatar.png │ │ │ ├── custom-shape-1.png │ │ │ ├── custom-shape-2.png │ │ │ ├── custom-shape-3.png │ │ │ └── custom-shape-4.png │ └── fonts │ │ └── Montserrat-Regular.ttf ├── controller │ ├── API │ │ ├── database │ │ │ └── firebase.dart │ │ └── facebook │ │ │ └── facebook_login.dart │ ├── validators │ │ └── user_input_validators.dart │ └── BloC │ │ ├── login_bloc.dart │ │ └── create_user_bloc.dart ├── model │ └── entities │ │ └── user_model.dart ├── main.dart └── view │ ├── Widgets │ ├── login_input_fields.dart │ ├── create_input_fields.dart │ └── custom_order_dialog.dart │ ├── Screens │ ├── home_screen.dart │ ├── profile_screen.dart │ ├── main_screen.dart │ ├── favorite_screen.dart │ ├── orders_screen.dart │ ├── register_screen.dart │ ├── login_screen.dart │ ├── food_info_screen.dart │ └── cart_screen.dart │ └── Tiles │ └── food_tile.dart ├── .metadata ├── .gitignore ├── LICENSE ├── test └── widget_test.dart ├── README.md ├── pubspec.yaml └── pubspec.lock /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /prototype_screens/Cart Screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/prototype_screens/Cart Screen.png -------------------------------------------------------------------------------- /prototype_screens/Home Screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/prototype_screens/Home Screen.png -------------------------------------------------------------------------------- /prototype_screens/Login Screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/prototype_screens/Login Screen.png -------------------------------------------------------------------------------- /lib/assets/images/icons/boi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/icons/boi-icon.png -------------------------------------------------------------------------------- /prototype_screens/Order Screeen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/prototype_screens/Order Screeen.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /lib/assets/fonts/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/fonts/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /lib/assets/images/background/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/background/login.png -------------------------------------------------------------------------------- /lib/assets/images/icons/geleia-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/icons/geleia-icon.png -------------------------------------------------------------------------------- /lib/assets/images/icons/porco-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/icons/porco-icon.png -------------------------------------------------------------------------------- /prototype_screens/Food Info Screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/prototype_screens/Food Info Screen.png -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /lib/assets/images/background/accepted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/background/accepted.png -------------------------------------------------------------------------------- /lib/assets/images/background/barbecue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/background/barbecue.png -------------------------------------------------------------------------------- /lib/assets/images/icons/facebook-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/icons/facebook-icon.png -------------------------------------------------------------------------------- /lib/assets/images/icons/galinha-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/icons/galinha-icon.png -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /lib/assets/images/background/male-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/background/male-avatar.png -------------------------------------------------------------------------------- /lib/assets/images/background/custom-shape-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/background/custom-shape-1.png -------------------------------------------------------------------------------- /lib/assets/images/background/custom-shape-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/background/custom-shape-2.png -------------------------------------------------------------------------------- /lib/assets/images/background/custom-shape-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/background/custom-shape-3.png -------------------------------------------------------------------------------- /lib/assets/images/background/custom-shape-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/lib/assets/images/background/custom-shape-4.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpgSouza/food-delivery-flutter-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/string.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | FoodDelivery 5 | 3106800599368488 6 | fb3106800599368488 7 | 8 | -------------------------------------------------------------------------------- /lib/controller/API/database/firebase.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | 4 | class Firebase{ 5 | 6 | FirebaseUser firebaseUser; 7 | FirebaseAuth firebaseAuth = FirebaseAuth.instance; 8 | Firestore firestore = Firestore.instance; 9 | 10 | } -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: fabeb2a16f1d008ab8230f450c49141d35669798 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /lib/model/entities/user_model.dart: -------------------------------------------------------------------------------- 1 | class User { 2 | String name; 3 | String lastName; 4 | String email; 5 | String confirmEmail; 6 | String phoneNumber; 7 | String password; 8 | 9 | Map toMap() { 10 | return { 11 | 'name': this.name, 12 | 'lastName': this.lastName, 13 | 'email': this.email, 14 | 'confirmEmail:': this.confirmEmail, 15 | 'phone': this.phoneNumber 16 | }; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/app/delivery/project/delivery_app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package app.delivery.project.delivery_app; 2 | 3 | import androidx.annotation.NonNull; 4 | import io.flutter.embedding.android.FlutterActivity; 5 | import io.flutter.embedding.engine.FlutterEngine; 6 | import io.flutter.plugins.GeneratedPluginRegistrant; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { 11 | GeneratedPluginRegistrant.registerWith(flutterEngine); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.5.0' 9 | classpath 'com.google.gms:google-services:4.3.3' 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | jcenter() 17 | } 18 | } 19 | 20 | rootProject.buildDir = '../build' 21 | subprojects { 22 | project.buildDir = "${rootProject.buildDir}/${project.name}" 23 | } 24 | subprojects { 25 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | task clean(type: Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Exceptions to above rules. 37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 38 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:delivery_app/view/Screens/food_info_screen.dart'; 2 | import 'package:delivery_app/view/Screens/home_screen.dart'; 3 | import 'package:delivery_app/view/Screens/login_screen.dart'; 4 | import 'package:delivery_app/view/Screens/register_screen.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter/services.dart'; 7 | import 'package:hexcolor/hexcolor.dart'; 8 | 9 | void main() => runApp(MyApp()); 10 | 11 | class MyApp extends StatelessWidget { 12 | @override 13 | Widget build(BuildContext context) { 14 | SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); 15 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(statusBarColor: Colors.transparent)); 16 | return MaterialApp( 17 | title: "Food Delivery", 18 | debugShowCheckedModeBanner: false, 19 | theme: ThemeData( 20 | primaryColor: Hexcolor('#D9455F'), 21 | fontFamily: 'Montserrat' 22 | ), 23 | home: LoginScreen() 24 | ); 25 | } 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 João Pedro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:delivery_app/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "792794297442", 4 | "firebase_url": "https://food-delivery-app-c95c5.firebaseio.com", 5 | "project_id": "food-delivery-app-c95c5", 6 | "storage_bucket": "food-delivery-app-c95c5.appspot.com" 7 | }, 8 | "client": [ 9 | { 10 | "client_info": { 11 | "mobilesdk_app_id": "1:792794297442:android:a4154b74c7e4fff0490d3b", 12 | "android_client_info": { 13 | "package_name": "app.delivery.project.delivery_app" 14 | } 15 | }, 16 | "oauth_client": [ 17 | { 18 | "client_id": "792794297442-e3kqeb1bmkc922ie2liesp297kfjvfg9.apps.googleusercontent.com", 19 | "client_type": 3 20 | } 21 | ], 22 | "api_key": [ 23 | { 24 | "current_key": "AIzaSyBIC129lnrqZQkpa1BNLJflICb0ZP8HYrk" 25 | } 26 | ], 27 | "services": { 28 | "appinvite_service": { 29 | "other_platform_oauth_client": [ 30 | { 31 | "client_id": "792794297442-e3kqeb1bmkc922ie2liesp297kfjvfg9.apps.googleusercontent.com", 32 | "client_type": 3 33 | } 34 | ] 35 | } 36 | } 37 | } 38 | ], 39 | "configuration_version": "1" 40 | } -------------------------------------------------------------------------------- /lib/controller/API/facebook/facebook_login.dart: -------------------------------------------------------------------------------- 1 | import 'package:delivery_app/controller/API/database/firebase.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:flutter_facebook_login/flutter_facebook_login.dart'; 4 | import 'dart:async'; 5 | 6 | class FacebookLoginAuth { 7 | static final _facebookLogin = FacebookLogin(); 8 | 9 | Firebase firebase; 10 | 11 | FacebookLoginAuth() { 12 | firebase = Firebase(); 13 | } 14 | 15 | Future _loginWithFacebook() async { 16 | final FacebookLoginResult _result = await _facebookLogin.logIn(['email']); 17 | 18 | switch(_result.status){ 19 | case FacebookLoginStatus.loggedIn: 20 | final facebookAuthCred = FacebookAuthProvider.getCredential(accessToken: _result.accessToken.token); 21 | firebase.firebaseUser = await firebase.firebaseAuth.signInWithCredential(facebookAuthCred); 22 | return firebase.firebaseUser; 23 | break; 24 | 25 | case FacebookLoginStatus.error: 26 | return null; 27 | break; 28 | case FacebookLoginStatus.cancelledByUser: 29 | return null; 30 | break; 31 | 32 | } 33 | 34 | } 35 | 36 | void logIn(){ 37 | _loginWithFacebook().then((user){ 38 | if(user != null){ 39 | firebase.firebaseUser = user; 40 | } 41 | }); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /lib/view/Widgets/login_input_fields.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LoginInputField extends StatelessWidget { 4 | final Icon prefixIcon; 5 | final IconButton suffixIcon; 6 | final String hint; 7 | final TextInputType textInputType; 8 | final bool obscure; 9 | final Stream stream; 10 | final Function(String) onChanged; 11 | 12 | LoginInputField( 13 | {this.prefixIcon, 14 | this.suffixIcon, 15 | this.hint, 16 | this.textInputType, 17 | this.obscure, 18 | this.stream, 19 | this.onChanged}); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return StreamBuilder( 24 | stream: stream, 25 | builder: (context, snapshot) { 26 | return TextFormField( 27 | onChanged: onChanged, 28 | style: TextStyle(color: Colors.black), 29 | keyboardType: textInputType, 30 | obscureText: obscure, 31 | decoration: InputDecoration( 32 | errorText: snapshot.hasError ? snapshot.error : null, 33 | border: InputBorder.none, 34 | prefixIcon: prefixIcon, 35 | suffixIcon: suffixIcon, 36 | hintText: hint, 37 | hintStyle: TextStyle(color: Colors.grey[400])), 38 | ); 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/controller/validators/user_input_validators.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | class UserInputValidator{ 4 | 5 | static String _email; 6 | 7 | final validateEmail = StreamTransformer.fromHandlers( 8 | handleData: (email, sink){ 9 | if(email.contains("@")){ 10 | sink.add(email); 11 | _email = email; 12 | } else { 13 | sink.addError("E-mail inválido"); 14 | } 15 | } 16 | ); 17 | 18 | final validateConfirmEmail = StreamTransformer.fromHandlers( 19 | handleData: (confirmEmail, sink,){ 20 | if(confirmEmail == _email && _email.isNotEmpty){ 21 | sink.add(confirmEmail); 22 | } else { 23 | sink.addError("E-mail diferente"); 24 | } 25 | } 26 | ); 27 | 28 | final validatePhone = StreamTransformer.fromHandlers( 29 | handleData: (phone, sink,) { 30 | if(phone.length == 16){ 31 | sink.add(phone); 32 | }else{ 33 | sink.addError("Telefone inválido"); 34 | } 35 | } 36 | ); 37 | 38 | final validatePassword = StreamTransformer.fromHandlers( 39 | handleData: (password, sink,) { 40 | if(password.length >= 6){ 41 | sink.add(password); 42 | }else{ 43 | sink.addError("A senha deve conter 6 ou mais caracteres"); 44 | } 45 | } 46 | ); 47 | 48 | 49 | } -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | delivery_app 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /lib/view/Widgets/create_input_fields.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mask_text_input_formatter/mask_text_input_formatter.dart'; 3 | 4 | class CreateInputField extends StatelessWidget { 5 | final Icon prefixIcon; 6 | final IconButton suffixIconButton; 7 | final String hint; 8 | final bool obscure; 9 | final TextInputType textInputType; 10 | final Stream stream; 11 | final Function(String) onChanged; 12 | final MaskTextInputFormatter maskTextInputFormatter; 13 | 14 | CreateInputField( 15 | {this.prefixIcon, 16 | this.hint, 17 | this.obscure, 18 | this.textInputType, 19 | this.suffixIconButton, 20 | this.stream, 21 | this.onChanged, 22 | this.maskTextInputFormatter}); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return StreamBuilder( 27 | stream: stream, 28 | builder: (context, snapshot) { 29 | return TextFormField( 30 | onChanged: onChanged, 31 | keyboardType: textInputType, 32 | inputFormatters: maskTextInputFormatter == null ? null : [maskTextInputFormatter], 33 | obscureText: obscure, 34 | decoration: InputDecoration( 35 | prefixIcon: prefixIcon, 36 | suffixIcon: suffixIconButton, 37 | focusedBorder: OutlineInputBorder( 38 | borderSide: 39 | BorderSide(color: Theme.of(context).primaryColor), 40 | ), 41 | border: OutlineInputBorder(), 42 | hintText: hint, 43 | hintStyle: TextStyle(color: Colors.grey[500]), 44 | errorText: snapshot.hasError ? snapshot.error : null)); 45 | }); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/view/Widgets/custom_order_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:delivery_app/view/Screens/orders_screen.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class OrderDialog extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Dialog( 8 | backgroundColor: Theme.of(context).primaryColor, 9 | elevation: 6.0, 10 | shape: RoundedRectangleBorder( 11 | borderRadius: BorderRadius.circular(12.0), 12 | ), 13 | child: Container( 14 | alignment: Alignment.center, 15 | padding: EdgeInsets.all(12.0), 16 | height: MediaQuery.of(context).size.height * 0.5, 17 | child: Column( 18 | children: [ 19 | Container( 20 | margin: EdgeInsets.only(top: 30.0), 21 | width: 150.0, 22 | height: 150.0, 23 | child: Image( 24 | image: AssetImage('lib/view/images/background/accepted.png'), 25 | ), 26 | ), 27 | SizedBox( 28 | height: 30.0, 29 | ), 30 | Text( 31 | "Seu pedido foi realizado com sucesso!", 32 | style: TextStyle( 33 | color: Colors.white, 34 | fontWeight: FontWeight.bold, 35 | fontSize: 16.0), 36 | ), 37 | SizedBox( 38 | height: 10.0, 39 | ), 40 | Text( 41 | "Código do pedido", 42 | style: TextStyle(color: Colors.white), 43 | ), 44 | SizedBox( 45 | height: 10.0, 46 | ), 47 | Text( 48 | "GNz6WztqfoZmoO6j6r3HugBoy5H3", 49 | style: TextStyle(color: Colors.white), 50 | ), 51 | ], 52 | ), 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Food Delivery App 2 | Aplicação em desenvolvimento com intuito de aplicar/desenvolver os conceitos aprendidos em Flutter 3 | 4 | ## Descrição 5 | Buscando preencher a escassez de aplicativos que listem fornecedores de comida pronta de qualidade, a aplicação tem como finalidade replicar as principais funcionalidades de um delivery app focado no campo de churrasco e carnes especiais. Por meio de uma interface intuitiva, simples e que vai lhe deixar com água na boca, encontre os melhores produtos para sua próxima refeição! 6 | 7 | ## Funcionalidades 8 | O aplicativo contém algumas funcionalidades essenciais, como: 9 | - Cadastro do usuário; 10 | - Login com Facebook; 11 | - Adicionar produtos no carrinho; 12 | - Aplicar cupom de desconto; 13 | - Visualizar status do pedido; 14 | - Favoritar pedidos; 15 | - Visualizar informações do usuário. 16 | 17 | ## Bibliotecas utilizadas 18 | #### Firebase Authentication 19 | 20 | - Autenticação do usuário com a firebase (https://pub.dev/packages/firebase_auth) 21 | 22 | #### Cloud Firestore 23 | 24 | - Manipulação dos dados no firestore (https://pub.dev/packages/cloud_firestore) 25 | 26 | #### Carousel Pro 27 | 28 | - Transição de imagens com carousel (https://pub.dev/packages/carousel_pro) 29 | 30 | #### Hex Color 31 | 32 | - Utilização de cores no formato hexadecimal (https://pub.dev/packages/hexcolor) 33 | 34 | #### Curved Navigation Bar 35 | 36 | - Bottom navigation bar personalizada (https://pub.dev/packages/curved_navigation_bar) 37 | 38 | ## Telas 39 | - Protótipos feitos no Adobe XD 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/controller/BloC/login_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:bloc_pattern/bloc_pattern.dart'; 4 | import 'package:delivery_app/controller/API/database/firebase.dart'; 5 | import 'package:delivery_app/controller/validators/user_input_validators.dart'; 6 | import 'package:delivery_app/model/entities/user_model.dart'; 7 | import 'package:rxdart/rxdart.dart'; 8 | 9 | enum LoginState { IDLE, LOADING, SUCCESS, FAIL } 10 | 11 | class LoginBloc extends BlocBase with UserInputValidator { 12 | Firebase firebase; 13 | User user; 14 | 15 | //Controllers 16 | final _emailController = BehaviorSubject(); 17 | final _passwordController = BehaviorSubject(); 18 | final _stateController = BehaviorSubject(); 19 | 20 | //Streams 21 | Stream get outEmail => _emailController.stream.transform(validateEmail); 22 | Stream get outPassword => _passwordController.stream.transform(validatePassword); 23 | Stream get outState => _stateController.stream; 24 | 25 | StreamSubscription _streamSubscription; 26 | 27 | Function(String) get changeEmail => _emailController.sink.add; 28 | Function(String) get changePassword => _passwordController.sink.add; 29 | 30 | LoginBloc() { 31 | user = User(); 32 | firebase = Firebase(); 33 | _streamSubscription = firebase.firebaseAuth.onAuthStateChanged.listen((userAuth) { 34 | if (userAuth != null) { 35 | firebase.firebaseAuth.signOut(); //alterar essa linha quando logout for implementado 36 | _stateController.add(LoginState.SUCCESS); 37 | } else { 38 | _stateController.add(LoginState.IDLE); 39 | } 40 | }); 41 | } 42 | 43 | void submit() { 44 | user.email = _emailController.value; 45 | user.password = _passwordController.value; 46 | 47 | _stateController.add(LoginState.LOADING); 48 | 49 | firebase.firebaseAuth 50 | .signInWithEmailAndPassword(email: user.email, password: user.password) 51 | .catchError((err) { 52 | _stateController.add(LoginState.FAIL); 53 | }); 54 | } 55 | 56 | @override 57 | void dispose() { 58 | _emailController.close(); 59 | _passwordController.close(); 60 | _stateController.close(); 61 | 62 | _streamSubscription.cancel(); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "app.delivery.project.delivery_app" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 42 | multiDexEnabled true 43 | } 44 | 45 | buildTypes { 46 | release { 47 | // TODO: Add your own signing config for the release build. 48 | // Signing with the debug keys for now, so `flutter run --release` works. 49 | signingConfig signingConfigs.debug 50 | } 51 | } 52 | } 53 | 54 | flutter { 55 | source '../..' 56 | } 57 | 58 | dependencies { 59 | testImplementation 'junit:junit:4.12' 60 | androidTestImplementation 'androidx.test:runner:1.1.1' 61 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 62 | implementation 'com.google.firebase:firebase-analytics:17.2.2' 63 | implementation 'com.google.firebase:firebase-firestore:21.2.1' 64 | } 65 | 66 | apply plugin: 'com.google.gms.google-services' 67 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: delivery_app 2 | description: A new Flutter application. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | flutter_staggered_grid_view: ^0.3.0 26 | cloud_firestore: ^0.12.9 27 | carousel_pro: ^1.0.0 28 | transparent_image: ^1.0.0 29 | firebase_auth: ^0.11.1+12 30 | url_launcher: ^5.1.1 31 | cupertino_icons: ^0.1.2 32 | hexcolor: ^1.0.2 33 | curved_navigation_bar: ^0.3.3 34 | bloc_pattern: ^2.3.2 35 | rxdart: ^0.24.1 36 | mask_text_input_formatter: ^1.0.7 37 | flutter_facebook_login: ^3.0.0 38 | 39 | dev_dependencies: 40 | flutter_test: 41 | sdk: flutter 42 | 43 | 44 | # For information on the generic Dart part of this file, see the 45 | # following page: https://dart.dev/tools/pub/pubspec 46 | 47 | # The following section is specific to Flutter. 48 | flutter: 49 | 50 | # The following line ensures that the Material Icons font is 51 | # included with your application, so that you can use the icons in 52 | # the material Icons class. 53 | uses-material-design: true 54 | 55 | # To add assets to your application, add an assets section, like this: 56 | assets: 57 | - lib/assets/images/icons/ 58 | - lib/assets/images/background/ 59 | 60 | # An image asset can refer to one or more resolution-specific "variants", see 61 | # https://flutter.dev/assets-and-images/#resolution-aware. 62 | 63 | # For details regarding adding assets from package dependencies, see 64 | # https://flutter.dev/assets-and-images/#from-packages 65 | 66 | # To add custom fonts to your application, add a fonts section here, 67 | # in this "flutter" section. Each entry in this list should have a 68 | # "family" key with the font family name, and a "fonts" key with a 69 | # list giving the asset and other descriptors for the font. For 70 | # example: 71 | fonts: 72 | - family: Montserrat 73 | fonts: 74 | - asset: lib/assets/fonts/Montserrat-Regular.ttf 75 | # - asset: fonts/Schyler-Italic.ttf 76 | # style: italic 77 | # - family: Trajan Pro 78 | # fonts: 79 | # - asset: fonts/TrajanPro.ttf 80 | # - asset: fonts/TrajanPro_Bold.ttf 81 | # weight: 700 82 | # 83 | # For details regarding fonts from package dependencies, 84 | # see https://flutter.dev/custom-fonts/#from-packages 85 | -------------------------------------------------------------------------------- /lib/controller/BloC/create_user_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc_pattern/bloc_pattern.dart'; 2 | import 'package:delivery_app/controller/API/database/firebase.dart'; 3 | import 'package:delivery_app/controller/validators/user_input_validators.dart'; 4 | import 'package:delivery_app/model/entities/user_model.dart'; 5 | import 'package:rxdart/rxdart.dart'; 6 | 7 | enum CreateState {IDLE, LOADING, SUCCESS, FAIL} 8 | 9 | class CreateUserBloc extends BlocBase with UserInputValidator{ 10 | 11 | User user; 12 | Firebase firebase; 13 | Map userData; 14 | 15 | //Controllers 16 | final _nameController = BehaviorSubject(); 17 | final _lastNameController = BehaviorSubject(); 18 | final _emailController = BehaviorSubject(); 19 | final _confirmEmailController = BehaviorSubject(); 20 | final _phoneNumberController = BehaviorSubject(); 21 | final _passwordController = BehaviorSubject(); 22 | final _stateController = BehaviorSubject(); 23 | 24 | //Streams 25 | Stream get outName => _nameController.stream; 26 | Stream get outLastName => _lastNameController.stream; 27 | Stream get outEmail => _emailController.stream.transform(validateEmail); 28 | Stream get outConfirmEmail => _confirmEmailController.stream.transform(validateConfirmEmail); 29 | Stream get outPhone => _phoneNumberController.stream.transform(validatePhone); 30 | Stream get outPassword => _passwordController.stream.transform(validatePassword); 31 | Stream get outState => _stateController.stream; 32 | 33 | Function(String) get changeName => _nameController.sink.add; 34 | Function(String) get changeLastName => _lastNameController.sink.add; 35 | Function(String) get changeEmail => _emailController.sink.add; 36 | Function(String) get changeConfirmEmail => _confirmEmailController.sink.add; 37 | Function(String) get changePhone => _phoneNumberController.sink.add; 38 | Function(String) get changePassword => _passwordController.sink.add; 39 | 40 | CreateUserBloc(){ 41 | user = User(); 42 | firebase = Firebase(); 43 | _stateController.add(CreateState.IDLE); 44 | } 45 | 46 | @override 47 | void dispose() { 48 | _nameController.close(); 49 | _lastNameController.close(); 50 | _emailController.close(); 51 | _confirmEmailController.close(); 52 | _phoneNumberController.close(); 53 | _passwordController.close(); 54 | _stateController.close(); 55 | } 56 | 57 | void createUser() async{ 58 | 59 | user.name = _nameController.value; 60 | user.lastName = _lastNameController.value; 61 | user.email = _emailController.value; 62 | user.confirmEmail = _confirmEmailController.value; 63 | user.phoneNumber = _phoneNumberController.value; 64 | user.password = _passwordController.value; 65 | 66 | userData = user.toMap(); 67 | 68 | _stateController.add(CreateState.LOADING); 69 | 70 | firebase.firebaseAuth.createUserWithEmailAndPassword(email: user.email, password: user.password).then((currentUser) async{ 71 | firebase.firebaseUser = currentUser; 72 | await _saveData(userData); 73 | }).catchError((err){ 74 | _stateController.add(CreateState.FAIL); 75 | }); 76 | 77 | } 78 | 79 | Future _saveData(Map userData) async{ 80 | await firebase.firestore.collection("users").document(firebase.firebaseUser.uid).setData(userData); 81 | _stateController.add(CreateState.SUCCESS); 82 | } 83 | 84 | } -------------------------------------------------------------------------------- /lib/view/Screens/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:delivery_app/view/Screens/cart_screen.dart'; 2 | import 'package:delivery_app/view/Screens/favorite_screen.dart'; 3 | import 'package:delivery_app/view/Screens/main_screen.dart'; 4 | import 'package:delivery_app/view/Screens/orders_screen.dart'; 5 | import 'package:delivery_app/view/Screens/profile_screen.dart'; 6 | import 'package:flutter/cupertino.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:curved_navigation_bar/curved_navigation_bar.dart'; 9 | 10 | class HomeScreen extends StatefulWidget { 11 | @override 12 | _HomeScreenState createState() => _HomeScreenState(); 13 | } 14 | 15 | class _HomeScreenState extends State { 16 | 17 | GlobalKey _bottomNavigationKey = GlobalKey(); 18 | int _currentPage = 2; 19 | int _cartAmount = 2; 20 | 21 | static const Color transparent = Color(0x00000000); 22 | 23 | final MainScreen _mainScreen = new MainScreen(); 24 | final ProfileScreen _profileScreen = new ProfileScreen(); 25 | final FavoriteScreen _favoriteScreen = new FavoriteScreen(); 26 | final OrdersScreen _ordersScreen = new OrdersScreen(); 27 | final CartScreen _cartScreen = new CartScreen(); 28 | 29 | Widget _screens = new MainScreen(); 30 | 31 | Widget _transition(int index){ 32 | switch (index){ 33 | case 0: 34 | return _ordersScreen; 35 | break; 36 | 37 | case 1: 38 | return _profileScreen; 39 | break; 40 | 41 | case 2: 42 | return _mainScreen; 43 | break; 44 | 45 | case 3: 46 | return _favoriteScreen; 47 | break; 48 | 49 | case 4: 50 | return _cartScreen; 51 | break; 52 | } 53 | } 54 | 55 | @override 56 | Widget build(BuildContext context) { 57 | return Scaffold( 58 | backgroundColor: Colors.white, 59 | bottomNavigationBar: CurvedNavigationBar( 60 | key: _bottomNavigationKey, 61 | index: _currentPage, 62 | backgroundColor: transparent, 63 | color: Theme.of(context).primaryColor, 64 | animationCurve: Curves.easeInOut, 65 | animationDuration: Duration(milliseconds: 450), 66 | height: 65.0, 67 | items: [ 68 | Icon(Icons.playlist_add_check, color: Colors.white, size: 30.0), 69 | Icon(Icons.person_pin, color: Colors.white, size: 30.0), 70 | Icon(Icons.home, color: Colors.white, size: 45.0), 71 | Icon(Icons.favorite, color: Colors.white, size: 30.0), 72 | Stack( 73 | children: [ 74 | Icon(Icons.shopping_cart, color: Colors.white, size: 30.0), 75 | Positioned( 76 | left: 12.0, 77 | bottom: 12.0, 78 | child: Container( 79 | width: 16.0, 80 | height: 18.0, 81 | decoration: BoxDecoration( 82 | borderRadius: BorderRadius.circular(10.0), 83 | color: Colors.black, 84 | ), 85 | child: Text("$_cartAmount", style: TextStyle(color: Colors.white),textAlign: TextAlign.center,), 86 | ), 87 | ) 88 | ], 89 | ) 90 | ], 91 | onTap: (int pageIndex) { 92 | setState(() { 93 | _screens = _transition(pageIndex); 94 | }); 95 | } 96 | ), 97 | body: _screens, 98 | ); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 15 | 22 | 26 | 29 | 34 | 37 | 38 | 39 | 40 | 41 | 42 | 44 | 47 | 48 | 52 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /lib/view/Screens/profile_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ProfileScreen extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Scaffold( 7 | backgroundColor: Colors.white, 8 | body: SafeArea( 9 | child: Container( 10 | width: MediaQuery.of(context).size.width, 11 | height: MediaQuery.of(context).size.height, 12 | child: Stack( 13 | children: [ 14 | Positioned( 15 | child: Container( 16 | height: 300.0, 17 | width: MediaQuery.of(context).size.width, 18 | child: Image( 19 | image: AssetImage( 20 | "lib/assets/images/background/custom-shape-3.png"), 21 | fit: BoxFit.fill, 22 | ), 23 | ), 24 | ), 25 | Positioned( 26 | child: Container( 27 | width: MediaQuery.of(context).size.width, 28 | child: Image( 29 | image: AssetImage( 30 | "lib/assets/images/background/custom-shape-4.png"), 31 | fit: BoxFit.fill, 32 | ), 33 | ), 34 | ), 35 | Positioned( 36 | left: 145.0, 37 | right: 145.0, 38 | top: 60.0, 39 | child: Container( 40 | decoration: BoxDecoration( 41 | boxShadow: [ 42 | BoxShadow( 43 | color: Colors.black38, 44 | blurRadius: 8.0, 45 | offset: Offset(0, 6)), 46 | ], 47 | borderRadius: BorderRadius.circular(60.0), 48 | ), 49 | child: CircleAvatar( 50 | radius: 60.0, 51 | backgroundImage: AssetImage("lib/assets/images/background/male-avatar.png"), 52 | ), 53 | ), 54 | ), 55 | Positioned( 56 | left: 10.0, 57 | right: 10.0, 58 | top: 195.0, 59 | child: Container( 60 | alignment: Alignment.center, 61 | child: Column( 62 | crossAxisAlignment: CrossAxisAlignment.center, 63 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 64 | children: [ 65 | Text("João Pedro Giacometti de Souza", style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),), 66 | SizedBox(height: 8.0,), 67 | Text("joao_giacometti@hotmail.com", style: TextStyle(color: Colors.grey[500]),), 68 | ], 69 | ), 70 | ), 71 | ), 72 | Positioned( 73 | left: 25.0, 74 | right: 25.0, 75 | top: 260.0, 76 | child: Container( 77 | alignment: Alignment.center, 78 | width: 324.0, 79 | padding: EdgeInsets.only(top: 15.0, bottom: 10.0), 80 | decoration: BoxDecoration( 81 | color: Colors.white, 82 | borderRadius: BorderRadius.circular(10.0), 83 | boxShadow: [ 84 | BoxShadow( 85 | color: Colors.black26, 86 | blurRadius: 10.0, 87 | offset: Offset(0, 6)) 88 | ], 89 | ), 90 | child: Column( 91 | crossAxisAlignment: CrossAxisAlignment.center, 92 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 93 | children: [ 94 | Icon(Icons.fastfood, color: Theme.of(context).primaryColor, size: 32.0,), 95 | Text("Pedidos", style: TextStyle(color: Theme.of(context).primaryColor),), 96 | Text("42", style: TextStyle(color: Theme.of(context).primaryColor),) 97 | ], 98 | ), 99 | ), 100 | ), 101 | Positioned( 102 | left: 25.0, 103 | right: 25.0, 104 | top: 380.0, 105 | child: Container( 106 | alignment: Alignment.center, 107 | width: 324.0, 108 | padding: EdgeInsets.all(14.0), 109 | decoration: BoxDecoration( 110 | color: Colors.white, 111 | borderRadius: BorderRadius.circular(10.0), 112 | boxShadow: [ 113 | BoxShadow( 114 | color: Colors.black26, 115 | blurRadius: 10.0, 116 | offset: Offset(0, 6)) 117 | ], 118 | ), 119 | child: Column( 120 | crossAxisAlignment: CrossAxisAlignment.start, 121 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 122 | mainAxisSize: MainAxisSize.max, 123 | children: [ 124 | Row( 125 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 126 | children: [ 127 | Text("Informações Gerais", 128 | style: TextStyle( 129 | color: Theme.of(context).primaryColor 130 | )), 131 | IconButton(icon: Icon(Icons.keyboard_arrow_right),onPressed: (){}, color: Theme.of(context).primaryColor,) 132 | ], 133 | ), 134 | Divider(thickness: 1.5,), 135 | Row( 136 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 137 | children: [ 138 | Text("Endereço de Cobrança", 139 | style: TextStyle( 140 | color: Theme.of(context).primaryColor 141 | )), 142 | IconButton(icon: Icon(Icons.keyboard_arrow_right),onPressed: (){}, color: Theme.of(context).primaryColor,) 143 | ], 144 | ), 145 | Divider(thickness: 1.5,), 146 | Row( 147 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 148 | children: [ 149 | Text("Formas de Pagamento", 150 | style: TextStyle( 151 | color: Theme.of(context).primaryColor 152 | )), 153 | IconButton(icon: Icon(Icons.keyboard_arrow_right),onPressed: (){}, color: Theme.of(context).primaryColor,) 154 | ], 155 | ), 156 | Divider(thickness: 1.5,), 157 | Row( 158 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 159 | children: [ 160 | Text("Histórico de Compra", 161 | style: TextStyle( 162 | color: Theme.of(context).primaryColor 163 | )), 164 | IconButton(icon: Icon(Icons.keyboard_arrow_right),onPressed: (){}, color: Theme.of(context).primaryColor,) 165 | ], 166 | ), 167 | ], 168 | ), 169 | ), 170 | ), 171 | ], 172 | ), 173 | ), 174 | ), 175 | ); 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /lib/view/Screens/main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:carousel_pro/carousel_pro.dart'; 2 | import 'package:delivery_app/view/Tiles/food_tile.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/widgets.dart'; 5 | 6 | class MainScreen extends StatefulWidget { 7 | @override 8 | _MainScreenState createState() => _MainScreenState(); 9 | } 10 | 11 | class _MainScreenState extends State { 12 | //Carousel Local Images Test 13 | int _currentImageIndex = 0; 14 | List imagesListURL = [ 15 | "https://images.pexels.com/photos/410648/pexels-photo-410648.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 16 | "https://images.pexels.com/photos/3821692/pexels-photo-3821692.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 17 | "https://images.pexels.com/photos/106343/pexels-photo-106343.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 18 | ]; 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return Scaffold( 23 | body: ListView( 24 | children: [ 25 | AspectRatio( 26 | aspectRatio: 1.7, 27 | child: Container( 28 | width: MediaQuery.of(context).size.width, 29 | decoration: BoxDecoration(boxShadow: [ 30 | BoxShadow( 31 | color: Colors.black38, blurRadius: 10.0, offset: Offset(0, 6)) 32 | ]), 33 | child: Carousel( 34 | images: imagesListURL.map((url) { 35 | return NetworkImage(url); 36 | }).toList(), 37 | overlayShadow: true, 38 | dotSize: 6.0, 39 | dotSpacing: 16.0, 40 | dotBgColor: Colors.transparent, 41 | dotColor: Theme.of(context).primaryColor, 42 | autoplay: false, 43 | ), 44 | ), 45 | ), 46 | Container( 47 | padding: EdgeInsets.only(left: 15.0, right: 15.0, top: 15.0, bottom: 0.0), 48 | child: Row( 49 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 50 | children: [ 51 | Text("Categorias", style: TextStyle(fontWeight: FontWeight.bold),), 52 | Row( 53 | children: [ 54 | Text("Ver todas >", style: TextStyle(color: Theme.of(context).primaryColor, fontWeight: FontWeight.bold),), 55 | ], 56 | ) 57 | ], 58 | ), 59 | ), 60 | Container( 61 | margin: EdgeInsets.symmetric( 62 | vertical: 4, 63 | ), 64 | padding: EdgeInsets.only(left: 25.0, right: 25.0, top: 15.0, bottom: 5.0), 65 | child: Row( 66 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 67 | children: [ 68 | Column( 69 | children: [ 70 | Container( 71 | decoration: BoxDecoration( 72 | borderRadius: BorderRadius.circular(45.0), 73 | boxShadow: [ 74 | BoxShadow( 75 | color: Colors.black38, 76 | blurRadius: 10.0, 77 | offset: Offset(0, 6)) 78 | ]), 79 | child: CircleAvatar( 80 | radius: 30.0, 81 | backgroundColor: Colors.white, 82 | child: Image( 83 | image: AssetImage("lib/assets/images/icons/boi-icon.png"), 84 | color: Theme.of(context).primaryColor, 85 | ), 86 | ), 87 | ), 88 | Padding( 89 | padding: EdgeInsets.only( 90 | top: 10.0, bottom: 10.0), 91 | child: Align( 92 | alignment: Alignment.center, 93 | child: Text("Boi",style: TextStyle(color: Theme.of(context).primaryColor, fontWeight: FontWeight.bold, fontSize: 13.0),), 94 | ), 95 | ) 96 | ], 97 | ), 98 | Column( 99 | children: [ 100 | Container( 101 | decoration: BoxDecoration( 102 | borderRadius: BorderRadius.circular(45.0), 103 | boxShadow: [ 104 | BoxShadow( 105 | color: Colors.black38, 106 | blurRadius: 10.0, 107 | offset: Offset(0, 6)) 108 | ]), 109 | child: CircleAvatar( 110 | radius: 30.0, 111 | backgroundColor: Colors.white, 112 | child: Image( 113 | image: AssetImage("lib/assets/images/icons/galinha-icon.png"), 114 | color: Theme.of(context).primaryColor, 115 | width: 50.0, 116 | height: 50.0, 117 | ), 118 | ), 119 | ), 120 | Padding( 121 | padding: EdgeInsets.only( 122 | top: 10.0, bottom: 10.0), 123 | child: Align( 124 | alignment: Alignment.center, 125 | child: Text("Frango", style: TextStyle(color: Theme.of(context).primaryColor,fontWeight: FontWeight.bold,fontSize: 13.0),), 126 | ), 127 | ) 128 | ], 129 | ), 130 | Column( 131 | children: [ 132 | Container( 133 | decoration: BoxDecoration( 134 | borderRadius: BorderRadius.circular(45.0), 135 | boxShadow: [ 136 | BoxShadow( 137 | color: Colors.black38, 138 | blurRadius: 10.0, 139 | offset: Offset(0, 6)) 140 | ]), 141 | child: CircleAvatar( 142 | radius: 30.0, 143 | backgroundColor: Colors.white, 144 | child: Image( 145 | image: AssetImage("lib/assets/images/icons/porco-icon.png"), 146 | color: Theme.of(context).primaryColor, 147 | width: 45.0, 148 | height: 45.0, 149 | ), 150 | ), 151 | ), 152 | Padding( 153 | padding: EdgeInsets.only( 154 | top: 10.0, bottom: 10.0), 155 | child: Align( 156 | alignment: Alignment.center, 157 | child: Text("Porco",style: TextStyle(color: Theme.of(context).primaryColor,fontWeight: FontWeight.bold, fontSize: 13.0),), 158 | ), 159 | ) 160 | ], 161 | ), 162 | Column( 163 | children: [ 164 | Container( 165 | decoration: BoxDecoration( 166 | borderRadius: BorderRadius.circular(45.0), 167 | boxShadow: [ 168 | BoxShadow( 169 | color: Colors.black38, 170 | blurRadius: 10.0, 171 | offset: Offset(0, 6)) 172 | ]), 173 | child: CircleAvatar( 174 | radius: 30.0, 175 | backgroundColor: Colors.white, 176 | child: Image( 177 | image: AssetImage("lib/assets/images/icons/geleia-icon.png"), 178 | color: Theme.of(context).primaryColor, 179 | width: 45.0, 180 | height: 45.0, 181 | ), 182 | ), 183 | ), 184 | Padding( 185 | padding: EdgeInsets.only( 186 | top: 10.0, bottom: 10.0,), 187 | child: Align( 188 | alignment: Alignment.center, 189 | child: Text("Geleias",style: TextStyle(color: Theme.of(context).primaryColor,fontWeight: FontWeight.bold,fontSize: 13.0),), 190 | ), 191 | ) 192 | ], 193 | ), 194 | ], 195 | ), 196 | ), 197 | FoodTile(), 198 | ], 199 | )); 200 | } 201 | } 202 | -------------------------------------------------------------------------------- /lib/view/Screens/favorite_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class FavoriteScreen extends StatelessWidget { 5 | //Card List Local Image Test 6 | List imagesListURL = [ 7 | "https://images.pexels.com/photos/410648/pexels-photo-410648.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 8 | "https://images.pexels.com/photos/3821692/pexels-photo-3821692.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 9 | "https://images.pexels.com/photos/266541/pexels-photo-266541.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 10 | ]; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | backgroundColor: Colors.white, 16 | body: SafeArea( 17 | child: Container( 18 | height: MediaQuery.of(context).size.height, 19 | width: MediaQuery.of(context).size.width, 20 | padding: 21 | EdgeInsets.only(left: 15.0, right: 15.0, top: 30.0, bottom: 24.0), 22 | child: ListView( 23 | physics: AlwaysScrollableScrollPhysics(), 24 | children: [ 25 | Card( 26 | shape: RoundedRectangleBorder( 27 | borderRadius: BorderRadius.circular(12.0)), 28 | elevation: 6.0, 29 | margin: EdgeInsets.symmetric(vertical: 10.0), 30 | color: Colors.white, 31 | child: Container( 32 | padding: EdgeInsets.only( 33 | left: 15.0, right: 5.0, top: 10.0, bottom: 10.0), 34 | child: Row( 35 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 36 | children: [ 37 | Container( 38 | decoration: BoxDecoration(boxShadow: [ 39 | BoxShadow( 40 | color: Colors.black38, 41 | blurRadius: 8.0, 42 | offset: Offset(0, 6)), 43 | ], borderRadius: BorderRadius.circular(40.0)), 44 | child: CircleAvatar( 45 | radius: 40.0, 46 | backgroundImage: NetworkImage( 47 | imagesListURL[1], 48 | ), 49 | ), 50 | ), 51 | Container( 52 | color: Colors.grey[500], 53 | height: 80.0, 54 | width: 1.0, 55 | ), 56 | Column( 57 | crossAxisAlignment: CrossAxisAlignment.start, 58 | children: [ 59 | Text( 60 | "Costela de Boi", 61 | style: TextStyle( 62 | color: Theme.of(context).primaryColor, 63 | fontSize: 16.0), 64 | ), 65 | SizedBox( 66 | height: 8.0, 67 | ), 68 | Text( 69 | "Categoria: Carne Bovina", 70 | style: TextStyle( 71 | color: Colors.grey[500], fontSize: 14.0), 72 | ), 73 | SizedBox( 74 | height: 8.0, 75 | ), 76 | Row( 77 | children: [ 78 | Icon( 79 | Icons.star, 80 | size: 20.0, 81 | color: Colors.grey[500], 82 | ), 83 | Icon(Icons.star, 84 | size: 20.0, color: Colors.grey[500]), 85 | Icon(Icons.star, 86 | size: 20.0, color: Colors.grey[500]), 87 | Icon(Icons.star, 88 | size: 20.0, color: Colors.grey[500]), 89 | Icon(Icons.star_half, 90 | size: 20.0, color: Colors.grey[500]), 91 | SizedBox( 92 | width: 8.0, 93 | ), 94 | Text("4.5") 95 | ], 96 | ), 97 | ], 98 | ), 99 | Column( 100 | crossAxisAlignment: CrossAxisAlignment.center, 101 | children: [ 102 | Text( 103 | "R\$ 49.99", 104 | style: TextStyle( 105 | color: Theme.of(context).primaryColor, 106 | fontSize: 16.0), 107 | ), 108 | SizedBox( 109 | height: 20.0, 110 | ), 111 | GestureDetector( 112 | onTap: () {}, 113 | child: Icon( 114 | Icons.favorite, 115 | color: Theme.of(context).primaryColor, 116 | size: 32.0, 117 | ), 118 | ) 119 | ], 120 | ), 121 | ], 122 | ), 123 | ), 124 | ), 125 | Card( 126 | shape: RoundedRectangleBorder( 127 | borderRadius: BorderRadius.circular(12.0)), 128 | elevation: 6.0, 129 | margin: EdgeInsets.symmetric(vertical: 15.0), 130 | color: Colors.white, 131 | child: Container( 132 | padding: EdgeInsets.only( 133 | left: 15.0, right: 5.0, top: 10.0, bottom: 10.0), 134 | child: Row( 135 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 136 | children: [ 137 | Container( 138 | decoration: BoxDecoration(boxShadow: [ 139 | BoxShadow( 140 | color: Colors.black38, 141 | blurRadius: 8.0, 142 | offset: Offset(0, 6)), 143 | ], borderRadius: BorderRadius.circular(40.0)), 144 | child: CircleAvatar( 145 | radius: 40.0, 146 | backgroundImage: NetworkImage( 147 | imagesListURL[0], 148 | ), 149 | ), 150 | ), 151 | Container( 152 | color: Colors.grey[500], 153 | height: 80.0, 154 | width: 1.0, 155 | ), 156 | Column( 157 | crossAxisAlignment: CrossAxisAlignment.start, 158 | children: [ 159 | Text( 160 | "Costela de porco", 161 | style: TextStyle( 162 | color: Theme.of(context).primaryColor, 163 | fontSize: 16.0), 164 | ), 165 | SizedBox( 166 | height: 8.0, 167 | ), 168 | Text( 169 | "Categoria: Carne Suína", 170 | style: TextStyle( 171 | color: Colors.grey[500], fontSize: 14.0), 172 | ), 173 | SizedBox( 174 | height: 8.0, 175 | ), 176 | Row( 177 | children: [ 178 | Icon( 179 | Icons.star, 180 | size: 20.0, 181 | color: Colors.grey[500], 182 | ), 183 | Icon(Icons.star, 184 | size: 20.0, color: Colors.grey[500]), 185 | Icon(Icons.star, 186 | size: 20.0, color: Colors.grey[500]), 187 | Icon(Icons.star, 188 | size: 20.0, color: Colors.grey[500]), 189 | Icon(Icons.star_half, 190 | size: 20.0, color: Colors.grey[500]), 191 | SizedBox( 192 | width: 8.0, 193 | ), 194 | Text("4.5") 195 | ], 196 | ), 197 | ], 198 | ), 199 | Column( 200 | crossAxisAlignment: CrossAxisAlignment.center, 201 | children: [ 202 | Text( 203 | "R\$ 39.99", 204 | style: TextStyle( 205 | color: Theme.of(context).primaryColor, 206 | fontSize: 16.0), 207 | ), 208 | SizedBox( 209 | height: 20.0, 210 | ), 211 | GestureDetector( 212 | onTap: () {}, 213 | child: Icon( 214 | Icons.favorite, 215 | color: Theme.of(context).primaryColor, 216 | size: 32.0, 217 | ), 218 | ) 219 | ], 220 | ), 221 | ], 222 | ), 223 | ), 224 | ) 225 | ], 226 | ), 227 | )), 228 | ); 229 | } 230 | } 231 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.11" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.0" 25 | bloc_pattern: 26 | dependency: "direct main" 27 | description: 28 | name: bloc_pattern 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.5.1" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.0.5" 39 | carousel_pro: 40 | dependency: "direct main" 41 | description: 42 | name: carousel_pro 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.0.0" 46 | charcode: 47 | dependency: transitive 48 | description: 49 | name: charcode 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.1.2" 53 | cloud_firestore: 54 | dependency: "direct main" 55 | description: 56 | name: cloud_firestore 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "0.12.11" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.14.11" 67 | convert: 68 | dependency: transitive 69 | description: 70 | name: convert 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.1.1" 74 | crypto: 75 | dependency: transitive 76 | description: 77 | name: crypto 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "2.1.3" 81 | cupertino_icons: 82 | dependency: "direct main" 83 | description: 84 | name: cupertino_icons 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.1.3" 88 | curved_navigation_bar: 89 | dependency: "direct main" 90 | description: 91 | name: curved_navigation_bar 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "0.3.3" 95 | firebase: 96 | dependency: transitive 97 | description: 98 | name: firebase 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "7.3.0" 102 | firebase_auth: 103 | dependency: "direct main" 104 | description: 105 | name: firebase_auth 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "0.11.1+12" 109 | firebase_core: 110 | dependency: transitive 111 | description: 112 | name: firebase_core 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "0.4.5" 116 | firebase_core_platform_interface: 117 | dependency: transitive 118 | description: 119 | name: firebase_core_platform_interface 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "1.0.4" 123 | firebase_core_web: 124 | dependency: transitive 125 | description: 126 | name: firebase_core_web 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "0.1.1+2" 130 | flutter: 131 | dependency: "direct main" 132 | description: flutter 133 | source: sdk 134 | version: "0.0.0" 135 | flutter_facebook_login: 136 | dependency: "direct main" 137 | description: 138 | name: flutter_facebook_login 139 | url: "https://pub.dartlang.org" 140 | source: hosted 141 | version: "3.0.0" 142 | flutter_staggered_grid_view: 143 | dependency: "direct main" 144 | description: 145 | name: flutter_staggered_grid_view 146 | url: "https://pub.dartlang.org" 147 | source: hosted 148 | version: "0.3.0" 149 | flutter_test: 150 | dependency: "direct dev" 151 | description: flutter 152 | source: sdk 153 | version: "0.0.0" 154 | flutter_web_plugins: 155 | dependency: transitive 156 | description: flutter 157 | source: sdk 158 | version: "0.0.0" 159 | hexcolor: 160 | dependency: "direct main" 161 | description: 162 | name: hexcolor 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.0.2" 166 | http: 167 | dependency: transitive 168 | description: 169 | name: http 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "0.12.1" 173 | http_parser: 174 | dependency: transitive 175 | description: 176 | name: http_parser 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "3.1.4" 180 | image: 181 | dependency: transitive 182 | description: 183 | name: image 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.1.4" 187 | js: 188 | dependency: transitive 189 | description: 190 | name: js 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "0.6.2" 194 | mask_text_input_formatter: 195 | dependency: "direct main" 196 | description: 197 | name: mask_text_input_formatter 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "1.0.7" 201 | matcher: 202 | dependency: transitive 203 | description: 204 | name: matcher 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "0.12.6" 208 | meta: 209 | dependency: transitive 210 | description: 211 | name: meta 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "1.1.8" 215 | path: 216 | dependency: transitive 217 | description: 218 | name: path 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "1.6.4" 222 | pedantic: 223 | dependency: transitive 224 | description: 225 | name: pedantic 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.8.0+1" 229 | petitparser: 230 | dependency: transitive 231 | description: 232 | name: petitparser 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "2.4.0" 236 | platform_detect: 237 | dependency: transitive 238 | description: 239 | name: platform_detect 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "1.4.0" 243 | plugin_platform_interface: 244 | dependency: transitive 245 | description: 246 | name: plugin_platform_interface 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "1.0.2" 250 | pub_semver: 251 | dependency: transitive 252 | description: 253 | name: pub_semver 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "1.4.4" 257 | quiver: 258 | dependency: transitive 259 | description: 260 | name: quiver 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "2.0.5" 264 | rxdart: 265 | dependency: "direct main" 266 | description: 267 | name: rxdart 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "0.24.1" 271 | sky_engine: 272 | dependency: transitive 273 | description: flutter 274 | source: sdk 275 | version: "0.0.99" 276 | source_span: 277 | dependency: transitive 278 | description: 279 | name: source_span 280 | url: "https://pub.dartlang.org" 281 | source: hosted 282 | version: "1.5.5" 283 | stack_trace: 284 | dependency: transitive 285 | description: 286 | name: stack_trace 287 | url: "https://pub.dartlang.org" 288 | source: hosted 289 | version: "1.9.3" 290 | stream_channel: 291 | dependency: transitive 292 | description: 293 | name: stream_channel 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "2.0.0" 297 | string_scanner: 298 | dependency: transitive 299 | description: 300 | name: string_scanner 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "1.0.5" 304 | term_glyph: 305 | dependency: transitive 306 | description: 307 | name: term_glyph 308 | url: "https://pub.dartlang.org" 309 | source: hosted 310 | version: "1.1.0" 311 | test_api: 312 | dependency: transitive 313 | description: 314 | name: test_api 315 | url: "https://pub.dartlang.org" 316 | source: hosted 317 | version: "0.2.11" 318 | transparent_image: 319 | dependency: "direct main" 320 | description: 321 | name: transparent_image 322 | url: "https://pub.dartlang.org" 323 | source: hosted 324 | version: "1.0.0" 325 | typed_data: 326 | dependency: transitive 327 | description: 328 | name: typed_data 329 | url: "https://pub.dartlang.org" 330 | source: hosted 331 | version: "1.1.6" 332 | url_launcher: 333 | dependency: "direct main" 334 | description: 335 | name: url_launcher 336 | url: "https://pub.dartlang.org" 337 | source: hosted 338 | version: "5.4.11" 339 | url_launcher_macos: 340 | dependency: transitive 341 | description: 342 | name: url_launcher_macos 343 | url: "https://pub.dartlang.org" 344 | source: hosted 345 | version: "0.0.1+7" 346 | url_launcher_platform_interface: 347 | dependency: transitive 348 | description: 349 | name: url_launcher_platform_interface 350 | url: "https://pub.dartlang.org" 351 | source: hosted 352 | version: "1.0.7" 353 | url_launcher_web: 354 | dependency: transitive 355 | description: 356 | name: url_launcher_web 357 | url: "https://pub.dartlang.org" 358 | source: hosted 359 | version: "0.1.1+6" 360 | vector_math: 361 | dependency: transitive 362 | description: 363 | name: vector_math 364 | url: "https://pub.dartlang.org" 365 | source: hosted 366 | version: "2.0.8" 367 | xml: 368 | dependency: transitive 369 | description: 370 | name: xml 371 | url: "https://pub.dartlang.org" 372 | source: hosted 373 | version: "3.5.0" 374 | sdks: 375 | dart: ">=2.7.0 <3.0.0" 376 | flutter: ">=1.12.13+hotfix.5 <2.0.0" 377 | -------------------------------------------------------------------------------- /lib/view/Screens/orders_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class OrdersScreen extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Scaffold( 8 | backgroundColor: Colors.white, 9 | body: SafeArea( 10 | child: Container( 11 | padding: EdgeInsets.only(left: 6.0, right: 6.0, top: 32.0), 12 | child: Column( 13 | children: [ 14 | Card( 15 | shape: RoundedRectangleBorder( 16 | borderRadius: BorderRadius.circular(12.0)), 17 | elevation: 6.0, 18 | child: ExpansionTile( 19 | initiallyExpanded: false, 20 | title: Text( 21 | "Pedido: GNz6WztqfoZmo", 22 | style: TextStyle( 23 | color: Theme.of(context).primaryColor, 24 | fontWeight: FontWeight.bold), 25 | ), 26 | children: [ 27 | Container( 28 | height: 10.0, 29 | ) 30 | ], 31 | ), 32 | ), 33 | SizedBox( 34 | height: 10.0, 35 | ), 36 | Card( 37 | shape: RoundedRectangleBorder( 38 | borderRadius: BorderRadius.circular(12.0)), 39 | elevation: 6.0, 40 | child: ExpansionTile( 41 | initiallyExpanded: false, 42 | title: Text( 43 | "Pedido: O6j6r3HugBoy5H3", 44 | style: TextStyle( 45 | color: Theme.of(context).primaryColor, 46 | fontWeight: FontWeight.bold), 47 | ), 48 | children: [ 49 | Container( 50 | padding: EdgeInsets.all(12.0), 51 | alignment: Alignment.centerLeft, 52 | child: Column( 53 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 54 | crossAxisAlignment: CrossAxisAlignment.start, 55 | children: [ 56 | Text( 57 | "Detalhes do pedido:", 58 | style: TextStyle( 59 | color: Theme.of(context).primaryColor, 60 | fontWeight: FontWeight.bold, 61 | fontSize: 16.0), 62 | ), 63 | Text( 64 | "2x Costela de Boi (R\$ 49.99)", 65 | style: TextStyle(color: Colors.grey[500]), 66 | ), 67 | Text( 68 | "1x Costela de Porco (R\$ 39.99)", 69 | style: TextStyle(color: Colors.grey[500]), 70 | ), 71 | SizedBox( 72 | height: 10.0, 73 | ), 74 | Text( 75 | "Acompanhamentos:", 76 | style: TextStyle( 77 | color: Theme.of(context).primaryColor, 78 | fontWeight: FontWeight.bold, 79 | fontSize: 16.0), 80 | ), 81 | Text( 82 | "1x Porção de Fritas (R\$ 9.99)", 83 | style: TextStyle(color: Colors.grey[500]), 84 | ), 85 | Text( 86 | "1x Geleia de Pimenta (R\$ 4.99)", 87 | style: TextStyle(color: Colors.grey[500]), 88 | ), 89 | Row( 90 | mainAxisAlignment: MainAxisAlignment.end, 91 | children: [ 92 | Text( 93 | "Subtotal: ", 94 | style: TextStyle( 95 | color: Theme.of(context).primaryColor), 96 | ), 97 | Text( 98 | "R\$ 154.95", 99 | style: TextStyle(color: Colors.grey[500]), 100 | ) 101 | ], 102 | ), 103 | Row( 104 | mainAxisAlignment: MainAxisAlignment.end, 105 | children: [ 106 | Text( 107 | "Entrega: ", 108 | style: TextStyle( 109 | color: Theme.of(context).primaryColor), 110 | ), 111 | Text( 112 | "R\$ 4.99", 113 | style: TextStyle(color: Colors.grey[500]), 114 | ) 115 | ], 116 | ), 117 | Row( 118 | mainAxisAlignment: MainAxisAlignment.end, 119 | children: [ 120 | Text( 121 | "Total: ", 122 | style: TextStyle( 123 | color: Theme.of(context).primaryColor), 124 | ), 125 | Text( 126 | "R\$ 159.94", 127 | style: TextStyle(color: Colors.grey[500]), 128 | ) 129 | ], 130 | ), 131 | SizedBox( 132 | height: 10.0, 133 | ), 134 | Text( 135 | "Cobrança:", 136 | style: TextStyle( 137 | color: Theme.of(context).primaryColor, 138 | fontWeight: FontWeight.bold, 139 | fontSize: 16.0), 140 | ), 141 | Text( 142 | "Endereco: Rua Oswaldo de Oliveira, 315", 143 | style: TextStyle(color: Colors.grey[500]), 144 | ), 145 | Text( 146 | "Pagamento: Mastercard Crédito", 147 | style: TextStyle(color: Colors.grey[500]), 148 | ), 149 | SizedBox( 150 | height: 15.0, 151 | ), 152 | Text( 153 | "Status do pedido: ", 154 | style: TextStyle( 155 | color: Colors.grey[500], 156 | fontWeight: FontWeight.bold, 157 | fontSize: 16), 158 | ), 159 | SizedBox(height: 10.0,), 160 | Container( 161 | padding: EdgeInsets.only(left: 1.0, right: 1.0), 162 | child: Flexible( 163 | child: Row( 164 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 165 | children: [ 166 | _buildStatusCircle("1", "Realizado","(20:00)", 3, 2, context), 167 | Container( 168 | height: 1.0, 169 | width: 30.0, 170 | margin: EdgeInsets.only(bottom: 28.0), 171 | color: Colors.grey[500], 172 | ), 173 | _buildStatusCircle("2","Visualizado","(20:05)", 3, 2, context), 174 | Container( 175 | height: 1.0, 176 | width: 30.0, 177 | margin: EdgeInsets.only(bottom: 28.0, right: 16.0), 178 | color: Colors.grey[500], 179 | ), 180 | _buildStatusCircle("3","Saiu","(--:--)", 3, 3, context), 181 | Container( 182 | height: 1.0, 183 | width: 30.0, 184 | margin: EdgeInsets.only(bottom: 28.0, left: 16.0), 185 | color: Colors.grey[500], 186 | ), 187 | _buildStatusCircle("4","Entregue","(--:--)", 3, 4, context), 188 | ], 189 | ), 190 | ) 191 | ), 192 | ], 193 | ), 194 | ), 195 | ], 196 | ), 197 | ) 198 | ], 199 | ), 200 | ))); 201 | } 202 | 203 | Widget _buildStatusCircle( 204 | String title, String subTitle, String orderDateTime ,int status, int thisStatus, BuildContext context) { 205 | Color _backgroundColor; 206 | Widget _child; 207 | 208 | if (status < thisStatus) { 209 | _backgroundColor = Colors.grey[500]; 210 | _child = Text( 211 | title, 212 | style: TextStyle(color: Colors.white), 213 | ); 214 | } else if (status == thisStatus) { 215 | _backgroundColor = Colors.blueAccent; 216 | _child = Stack( 217 | alignment: Alignment.center, 218 | children: [ 219 | Text( 220 | title, 221 | style: TextStyle(color: Colors.white), 222 | ), 223 | CircularProgressIndicator( 224 | valueColor: AlwaysStoppedAnimation(Colors.white), 225 | ) 226 | ], 227 | ); 228 | } else { 229 | _backgroundColor = Theme.of(context).primaryColor; 230 | _child = Icon( 231 | Icons.check, 232 | color: Colors.white, 233 | ); 234 | } 235 | 236 | return Column( 237 | children: [ 238 | CircleAvatar( 239 | radius: 18.0, 240 | backgroundColor: _backgroundColor, 241 | child: _child, 242 | ), 243 | Text(subTitle, style: TextStyle(color: Colors.grey[850], fontSize: 13.0),), 244 | Text(orderDateTime, style: TextStyle(color: Colors.grey[850], fontSize: 13.0),) 245 | ], 246 | ); 247 | } 248 | } 249 | -------------------------------------------------------------------------------- /lib/view/Screens/register_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:delivery_app/controller/BloC/create_user_bloc.dart'; 2 | import 'package:delivery_app/view/Screens/login_screen.dart'; 3 | import 'package:delivery_app/view/Widgets/create_input_fields.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:mask_text_input_formatter/mask_text_input_formatter.dart'; 7 | 8 | class RegisterScreen extends StatefulWidget { 9 | @override 10 | _RegisterScreenState createState() => _RegisterScreenState(); 11 | } 12 | 13 | class _RegisterScreenState extends State { 14 | 15 | final _registerBloc = CreateUserBloc(); 16 | final _scaffoldKey = GlobalKey(); 17 | 18 | final _phoneMaskFormatter = MaskTextInputFormatter(mask: "(##) # ####-####"); 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | 24 | _registerBloc.outState.listen((state) { 25 | switch (state) { 26 | case CreateState.SUCCESS: 27 | Navigator.of(context).pushReplacement( 28 | MaterialPageRoute(builder: (context) => LoginScreen())); 29 | break; 30 | case CreateState.FAIL: 31 | case CreateState.LOADING: 32 | _scaffoldKey.currentState.showSnackBar(SnackBar( 33 | content: Text( 34 | "Cadastrado com sucesso!", 35 | textAlign: TextAlign.center, 36 | style: TextStyle(fontWeight: FontWeight.bold), 37 | ), 38 | elevation: 6.0, 39 | backgroundColor: Colors.green, 40 | duration: Duration(seconds: 2), 41 | )); 42 | break; 43 | case CreateState.IDLE: 44 | } 45 | }); 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | return Scaffold( 51 | key: _scaffoldKey, 52 | backgroundColor: Theme.of(context).primaryColor, 53 | body: StreamBuilder( 54 | stream: _registerBloc.outState, 55 | builder: (context, snapshot) { 56 | switch (snapshot.data) { 57 | case CreateState.LOADING: 58 | return Center( 59 | child: CircularProgressIndicator(), 60 | ); 61 | case CreateState.SUCCESS: 62 | case CreateState.FAIL: 63 | case CreateState.IDLE: 64 | return Form( 65 | child: SafeArea( 66 | child: ListView( 67 | physics: AlwaysScrollableScrollPhysics(), 68 | children: [ 69 | Container( 70 | width: MediaQuery.of(context).size.width, 71 | height: MediaQuery.of(context).size.height, 72 | child: Stack( 73 | children: [ 74 | Positioned( 75 | child: Container( 76 | height: 300.0, 77 | width: MediaQuery.of(context).size.width, 78 | child: Image( 79 | image: AssetImage( 80 | "lib/assets/images/background/custom-shape-2.png"), 81 | fit: BoxFit.fill, 82 | ), 83 | ), 84 | ), 85 | Positioned( 86 | child: Container( 87 | width: MediaQuery.of(context).size.width, 88 | child: Image( 89 | image: AssetImage( 90 | "lib/assets/images/background/custom-shape-1.png"), 91 | fit: BoxFit.fill, 92 | ), 93 | ), 94 | ), 95 | Positioned( 96 | top: 10.0, 97 | left: 10.0, 98 | child: Row( 99 | children: [ 100 | IconButton( 101 | icon: Icon(Icons.keyboard_arrow_left), 102 | color: Theme.of(context).primaryColor, 103 | iconSize: 50.0, 104 | padding: EdgeInsets.zero, 105 | onPressed: () { 106 | Navigator.of(context) 107 | .pushReplacement(MaterialPageRoute( 108 | builder: (context) => LoginScreen(), 109 | )); 110 | }, 111 | ), 112 | Text( 113 | "VOLTAR", 114 | style: TextStyle( 115 | color: Theme.of(context).primaryColor, 116 | fontSize: 16.0), 117 | ) 118 | ], 119 | )), 120 | Positioned( 121 | top: 195.0, 122 | left: 25.0, 123 | right: 25.0, 124 | child: Container( 125 | width: 369.0, 126 | height: 440, 127 | padding: EdgeInsets.all(12.0), 128 | decoration: BoxDecoration( 129 | color: Colors.white, 130 | borderRadius: BorderRadius.circular(10.0), 131 | boxShadow: [ 132 | BoxShadow( 133 | color: Colors.black38, 134 | blurRadius: 10.0, 135 | offset: Offset(0, 6)) 136 | ], 137 | ), 138 | child: Container( 139 | padding: EdgeInsets.all(4.0), 140 | child: Column( 141 | crossAxisAlignment: 142 | CrossAxisAlignment.stretch, 143 | mainAxisAlignment: 144 | MainAxisAlignment.spaceBetween, 145 | children: [ 146 | Text( 147 | "Cadastro", 148 | style: TextStyle( 149 | color: Theme.of(context) 150 | .primaryColor, 151 | fontSize: 26.0), 152 | ), 153 | Row( 154 | mainAxisAlignment: 155 | MainAxisAlignment.spaceBetween, 156 | children: [ 157 | Expanded( 158 | child: CreateInputField( 159 | prefixIcon: Icon( 160 | Icons.person, 161 | color: Theme.of(context) 162 | .primaryColor, 163 | ), 164 | hint: "Nome", 165 | obscure: false, 166 | textInputType: TextInputType.text, 167 | stream: _registerBloc.outName, 168 | onChanged: 169 | _registerBloc.changeName, 170 | )), 171 | SizedBox( 172 | width: 10.0, 173 | ), 174 | Expanded( 175 | child: CreateInputField( 176 | prefixIcon: null, 177 | hint: "Sobrenome", 178 | obscure: false, 179 | textInputType: TextInputType.text, 180 | stream: _registerBloc.outLastName, 181 | onChanged: 182 | _registerBloc.changeLastName, 183 | )) 184 | ], 185 | ), 186 | CreateInputField( 187 | prefixIcon: Icon( 188 | Icons.email, 189 | color: 190 | Theme.of(context).primaryColor, 191 | ), 192 | hint: "E-mail", 193 | obscure: false, 194 | textInputType: 195 | TextInputType.emailAddress, 196 | stream: _registerBloc.outEmail, 197 | onChanged: _registerBloc.changeEmail, 198 | ), 199 | CreateInputField( 200 | prefixIcon: Icon( 201 | Icons.email, 202 | color: 203 | Theme.of(context).primaryColor, 204 | ), 205 | hint: "Confirmar e-mail", 206 | obscure: false, 207 | textInputType: 208 | TextInputType.emailAddress, 209 | stream: _registerBloc.outConfirmEmail, 210 | onChanged: 211 | _registerBloc.changeConfirmEmail, 212 | ), 213 | CreateInputField( 214 | prefixIcon: Icon( 215 | Icons.phone, 216 | color: 217 | Theme.of(context).primaryColor, 218 | ), 219 | hint: "Telefone", 220 | maskTextInputFormatter: _phoneMaskFormatter, 221 | obscure: false, 222 | textInputType: TextInputType.phone, 223 | stream: _registerBloc.outPhone, 224 | onChanged: _registerBloc.changePhone, 225 | ), 226 | CreateInputField( 227 | prefixIcon: Icon( 228 | Icons.vpn_key, 229 | color: 230 | Theme.of(context).primaryColor, 231 | ), 232 | suffixIconButton: IconButton( 233 | icon: Icon(Icons.remove_red_eye), 234 | color: 235 | Theme.of(context).primaryColor, 236 | onPressed: () {}, 237 | ), 238 | hint: "Senha", 239 | obscure: true, 240 | textInputType: TextInputType.text, 241 | stream: _registerBloc.outPassword, 242 | onChanged: 243 | _registerBloc.changePassword, 244 | ), 245 | ], 246 | ), 247 | )), 248 | ), 249 | Positioned( 250 | top: 670.0, 251 | left: 45.0, 252 | right: 45.0, 253 | child: Container( 254 | height: 60.0, 255 | alignment: Alignment.center, 256 | child: RaisedButton( 257 | onPressed: _registerBloc.createUser, 258 | shape: RoundedRectangleBorder( 259 | borderRadius: 260 | BorderRadius.circular(40.0)), 261 | padding: EdgeInsets.all(0.0), 262 | child: Ink( 263 | decoration: BoxDecoration( 264 | color: Colors.white, 265 | borderRadius: 266 | BorderRadius.circular(40.0)), 267 | child: Container( 268 | constraints: BoxConstraints( 269 | maxWidth: 350.0, minHeight: 60.0), 270 | alignment: Alignment.center, 271 | child: Text( 272 | "CADASTRAR", 273 | textAlign: TextAlign.center, 274 | style: TextStyle( 275 | color: Theme.of(context) 276 | .primaryColor, 277 | fontSize: 15.0, 278 | ), 279 | ), 280 | )), 281 | ), 282 | )), 283 | ], 284 | ), 285 | ), 286 | ], 287 | )), 288 | ); 289 | } 290 | }), 291 | ); 292 | } 293 | } 294 | -------------------------------------------------------------------------------- /lib/view/Screens/login_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:delivery_app/controller/API/facebook/facebook_login.dart'; 2 | import 'package:delivery_app/controller/BloC/login_bloc.dart'; 3 | import 'package:delivery_app/view/Screens/home_screen.dart'; 4 | import 'package:delivery_app/view/Screens/register_screen.dart'; 5 | import 'package:delivery_app/view/Widgets/login_input_fields.dart'; 6 | import 'package:flutter/cupertino.dart'; 7 | import 'package:flutter/material.dart'; 8 | 9 | class LoginScreen extends StatefulWidget { 10 | @override 11 | _LoginScreenState createState() => _LoginScreenState(); 12 | } 13 | 14 | class _LoginScreenState extends State { 15 | final _loginBloc = LoginBloc(); 16 | final _scaffoldKey = GlobalKey(); 17 | 18 | final _authWithFacebook = FacebookLoginAuth(); 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | _loginBloc.outState.listen((state) { 24 | switch (state) { 25 | case LoginState.SUCCESS: 26 | Navigator.of(context).pushReplacement( 27 | MaterialPageRoute(builder: (context) => HomeScreen())); 28 | break; 29 | case LoginState.FAIL: 30 | _scaffoldKey.currentState.showSnackBar(SnackBar( 31 | content: Text( 32 | "Credenciais incorretas", 33 | textAlign: TextAlign.center, 34 | style: TextStyle(fontWeight: FontWeight.bold), 35 | ), 36 | elevation: 6.0, 37 | backgroundColor: Colors.redAccent, 38 | duration: Duration(seconds: 2), 39 | )); 40 | break; 41 | case LoginState.LOADING: 42 | case LoginState.IDLE: 43 | } 44 | }); 45 | } 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return Scaffold( 50 | key: _scaffoldKey, 51 | backgroundColor: Theme.of(context).primaryColor, 52 | body: StreamBuilder( 53 | stream: _loginBloc.outState, 54 | builder: (context, snapshot) { 55 | switch (snapshot.data) { 56 | case LoginState.LOADING: 57 | return Center( 58 | child: CircularProgressIndicator(), 59 | ); 60 | case LoginState.FAIL: 61 | case LoginState.SUCCESS: 62 | case LoginState.IDLE: 63 | return Form( 64 | child: SafeArea( 65 | child: Container( 66 | width: MediaQuery.of(context).size.width, 67 | height: MediaQuery.of(context).size.height, 68 | child: Stack( 69 | children: [ 70 | Positioned( 71 | top: 110.0, 72 | left: 150.0, 73 | child: Container( 74 | height: 200.0, 75 | child: Image( 76 | image: AssetImage( 77 | "lib/assets/images/background/login.png"), 78 | fit: BoxFit.fill, 79 | ), 80 | ), 81 | ), 82 | Positioned( 83 | child: Container( 84 | height: 300.0, 85 | width: MediaQuery.of(context).size.width, 86 | child: Image( 87 | image: AssetImage( 88 | "lib/assets/images/background/custom-shape-2.png"), 89 | fit: BoxFit.fill, 90 | ), 91 | ), 92 | ), 93 | Positioned( 94 | child: Container( 95 | width: MediaQuery.of(context).size.width, 96 | child: Image( 97 | image: AssetImage( 98 | "lib/assets/images/background/custom-shape-1.png"), 99 | fit: BoxFit.fill, 100 | ), 101 | ), 102 | ), 103 | Positioned( 104 | top: 305.0, 105 | left: 25.0, 106 | right: 25.0, 107 | child: Container( 108 | alignment: Alignment.center, 109 | width: 369.0, 110 | padding: EdgeInsets.all(12.0), 111 | decoration: BoxDecoration( 112 | color: Colors.white, 113 | borderRadius: BorderRadius.circular(10.0), 114 | boxShadow: [ 115 | BoxShadow( 116 | color: Colors.black38, 117 | blurRadius: 10.0, 118 | offset: Offset(0, 6)) 119 | ], 120 | ), 121 | child: Column( 122 | crossAxisAlignment: CrossAxisAlignment.start, 123 | children: [ 124 | Container( 125 | padding: EdgeInsets.all(8.0), 126 | decoration: BoxDecoration( 127 | border: Border( 128 | bottom: BorderSide( 129 | color: Colors.grey[100]))), 130 | child: Column( 131 | crossAxisAlignment: 132 | CrossAxisAlignment.start, 133 | children: [ 134 | Text( 135 | "Login", 136 | style: TextStyle( 137 | color: Theme.of(context) 138 | .primaryColor, 139 | fontSize: 22.0), 140 | ), 141 | LoginInputField( 142 | prefixIcon: Icon( 143 | Icons.person, 144 | color: Theme.of(context) 145 | .primaryColor, 146 | ), 147 | suffixIcon: null, 148 | hint: "E-mail", 149 | textInputType: 150 | TextInputType.emailAddress, 151 | obscure: false, 152 | stream: _loginBloc.outEmail, 153 | onChanged: _loginBloc.changeEmail, 154 | ) 155 | ], 156 | )), 157 | Container( 158 | padding: EdgeInsets.all(8.0), 159 | decoration: BoxDecoration( 160 | border: Border( 161 | bottom: BorderSide( 162 | color: Colors.grey[100]))), 163 | child: LoginInputField( 164 | prefixIcon: Icon( 165 | Icons.vpn_key, 166 | color: Theme.of(context).primaryColor, 167 | ), 168 | suffixIcon: IconButton( 169 | onPressed: () {}, 170 | icon: Icon(Icons.remove_red_eye), 171 | color: Theme.of(context).primaryColor, 172 | ), 173 | hint: "Password", 174 | textInputType: TextInputType.text, 175 | obscure: true, 176 | stream: _loginBloc.outPassword, 177 | onChanged: _loginBloc.changePassword, 178 | )), 179 | Align( 180 | alignment: Alignment.centerRight, 181 | child: FlatButton( 182 | padding: EdgeInsets.zero, 183 | onPressed: () {}, 184 | child: Text( 185 | "Esqueceu sua senha?", 186 | textAlign: TextAlign.right, 187 | style: TextStyle( 188 | color: 189 | Theme.of(context).primaryColor), 190 | ), 191 | ), 192 | ), 193 | ], 194 | ), 195 | ), 196 | ), 197 | Positioned( 198 | top: 570.0, 199 | left: 45.0, 200 | right: 45.0, 201 | child: Container( 202 | height: 55.0, 203 | alignment: Alignment.center, 204 | child: RaisedButton( 205 | onPressed: _loginBloc.submit, 206 | shape: RoundedRectangleBorder( 207 | borderRadius: 208 | BorderRadius.circular(40.0)), 209 | padding: EdgeInsets.all(0.0), 210 | child: Ink( 211 | decoration: BoxDecoration( 212 | color: Colors.white, 213 | borderRadius: 214 | BorderRadius.circular(40.0)), 215 | child: Container( 216 | constraints: BoxConstraints( 217 | maxWidth: 350.0, minHeight: 60.0), 218 | alignment: Alignment.center, 219 | child: Text( 220 | "ENTRAR", 221 | textAlign: TextAlign.center, 222 | style: TextStyle( 223 | color: 224 | Theme.of(context).primaryColor, 225 | fontSize: 15.0, 226 | ), 227 | ), 228 | )), 229 | ), 230 | )), 231 | Positioned( 232 | top: 640.0, 233 | left: 35.0, 234 | right: 35.0, 235 | child: Container( 236 | alignment: Alignment.center, 237 | child: Row( 238 | mainAxisAlignment: 239 | MainAxisAlignment.spaceBetween, 240 | children: [ 241 | Container( 242 | color: Colors.white60, 243 | width: 145, 244 | height: 1, 245 | ), 246 | Text( 247 | "OU", 248 | style: TextStyle(color: Colors.white), 249 | ), 250 | Container( 251 | color: Colors.white60, 252 | width: 145, 253 | height: 1, 254 | ), 255 | ], 256 | ), 257 | )), 258 | Positioned( 259 | top: 670.0, 260 | left: 45.0, 261 | right: 45.0, 262 | child: Container( 263 | height: 55.0, 264 | alignment: Alignment.center, 265 | child: Container( 266 | constraints: BoxConstraints( 267 | maxWidth: 350.0, minHeight: 60.0), 268 | child: OutlineButton( 269 | padding: EdgeInsets.only( 270 | left: 40.0, right: 40.0), 271 | color: Color.fromARGB(255, 217, 69, 65), 272 | child: Tab( 273 | icon: Container( 274 | child: Row( 275 | children: [ 276 | Image( 277 | image: AssetImage( 278 | 'lib/assets/images/icons/facebook-icon.png'), 279 | color: Colors.white, 280 | height: 30.0, 281 | ), 282 | SizedBox( 283 | width: 20.0, 284 | ), 285 | Text( 286 | "ENTRAR COM FACEBOOK", 287 | textAlign: TextAlign.center, 288 | style: TextStyle( 289 | color: Colors.white, 290 | ), 291 | ) 292 | ], 293 | ), 294 | ), 295 | ), 296 | borderSide: BorderSide( 297 | color: Colors.white, width: 2), 298 | shape: StadiumBorder(), 299 | onPressed: _authWithFacebook.logIn), 300 | ), 301 | )), 302 | Positioned( 303 | top: 725.0, 304 | left: 45.0, 305 | right: 45.0, 306 | child: Align( 307 | alignment: Alignment.center, 308 | child: FlatButton( 309 | padding: EdgeInsets.zero, 310 | child: FlatButton( 311 | onPressed: () { 312 | Navigator.of(context) 313 | .pushReplacement(MaterialPageRoute( 314 | builder: (context) => 315 | RegisterScreen(), 316 | )); 317 | }, 318 | padding: EdgeInsets.zero, 319 | child: Row( 320 | mainAxisAlignment: 321 | MainAxisAlignment.center, 322 | children: [ 323 | Text( 324 | "Não possui conta?", 325 | style: 326 | TextStyle(color: Colors.white), 327 | ), 328 | SizedBox( 329 | width: 6.0, 330 | ), 331 | Text( 332 | "Cadastre-se", 333 | style: 334 | TextStyle(color: Colors.black), 335 | ), 336 | ], 337 | ))), 338 | ), 339 | ) 340 | ], 341 | ), 342 | )), 343 | ); 344 | } 345 | })); 346 | } 347 | } 348 | -------------------------------------------------------------------------------- /lib/view/Screens/food_info_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:carousel_pro/carousel_pro.dart'; 2 | import 'package:delivery_app/view/Screens/home_screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class FoodInfoScreen extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | //Card List Local Image Test 9 | List imagesListURL = [ 10 | "https://images.pexels.com/photos/410648/pexels-photo-410648.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 11 | "https://images.pexels.com/photos/3821692/pexels-photo-3821692.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 12 | "https://images.pexels.com/photos/266541/pexels-photo-266541.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 13 | ]; 14 | return Scaffold( 15 | backgroundColor: Colors.white, 16 | body: Stack( 17 | children: [ 18 | Column( 19 | children: [ 20 | Container( 21 | height: MediaQuery.of(context).size.height / 3.0, 22 | decoration: BoxDecoration( 23 | color: Theme.of(context).primaryColor, 24 | boxShadow: [ 25 | BoxShadow( 26 | color: Colors.black38, 27 | blurRadius: 10.0, 28 | offset: Offset(0, 6)) 29 | ]), 30 | ), 31 | ], 32 | ), 33 | Positioned( 34 | width: 250.0, 35 | left: 30.0, 36 | child: Container( 37 | width: 320.0, 38 | height: 250.0, 39 | child: Image( 40 | image: AssetImage('lib/assets/images/background/barbecue.png'), 41 | height: 280.0, 42 | ), 43 | ), 44 | ), 45 | Positioned( 46 | top: 25.0, 47 | left: 10.0, 48 | child: IconButton( 49 | icon: Icon(Icons.keyboard_arrow_left, color: Colors.white70,size: 50.0,), 50 | onPressed: (){ 51 | Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (context)=> HomeScreen())); 52 | }, 53 | ), 54 | ), 55 | Column( 56 | children: [ 57 | Container( 58 | alignment: Alignment.topCenter, 59 | padding: EdgeInsets.only( 60 | top: MediaQuery.of(context).size.height / 5.0, 61 | right: 10.0, 62 | left: 10.0), 63 | child: Container( 64 | height: 200.0, 65 | width: MediaQuery.of(context).size.width, 66 | child: Card( 67 | shape: RoundedRectangleBorder( 68 | borderRadius: BorderRadius.circular(12.0)), 69 | color: Colors.white, 70 | elevation: 6.0, 71 | child: Container( 72 | padding: EdgeInsets.all(16.0), 73 | child: Row( 74 | children: [ 75 | Container( 76 | width: 180.0, 77 | height: 150.0, 78 | decoration: BoxDecoration(boxShadow: [ 79 | BoxShadow( 80 | color: Colors.black38, 81 | blurRadius: 10.0, 82 | offset: Offset(0, 6)) 83 | ]), 84 | child: Carousel( 85 | images: imagesListURL.map((imgURL) { 86 | return NetworkImage(imgURL); 87 | }).toList(), 88 | dotSize: 6.0, 89 | dotSpacing: 16.0, 90 | dotBgColor: Colors.transparent, 91 | dotColor: Theme.of(context).primaryColor, 92 | autoplay: true, 93 | borderRadius: true, 94 | radius: Radius.circular(12.0), 95 | ), 96 | ), 97 | SizedBox( 98 | width: 24.0, 99 | ), 100 | Flexible( 101 | child: Column( 102 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 103 | crossAxisAlignment: CrossAxisAlignment.start, 104 | children: [ 105 | Text( 106 | "Costela de Boi", 107 | style: TextStyle( 108 | color: Theme.of(context).primaryColor, 109 | fontWeight: FontWeight.bold, 110 | fontSize: 16.0), 111 | ), 112 | Text( 113 | "500g de costela assada por 12 horas na brasa", 114 | style: TextStyle(color: Colors.grey[500]), 115 | ), 116 | Row( 117 | children: [ 118 | Icon( 119 | Icons.restaurant_menu, 120 | color: Colors.grey[500], 121 | ), 122 | Text( 123 | "- 3 pessoas", 124 | style: TextStyle(color: Colors.grey[500]), 125 | ) 126 | ], 127 | ), 128 | Row( 129 | mainAxisAlignment: 130 | MainAxisAlignment.spaceBetween, 131 | children: [ 132 | Text( 133 | "R\$ 49.99", 134 | style: TextStyle( 135 | color: Theme.of(context).primaryColor, 136 | fontWeight: FontWeight.bold, 137 | fontSize: 16.0), 138 | ), 139 | Icon( 140 | Icons.favorite_border, 141 | color: Theme.of(context).primaryColor, 142 | ) 143 | ], 144 | ), 145 | Container( 146 | width: 140, 147 | height: 35, 148 | decoration: BoxDecoration( 149 | color: Colors.white, 150 | borderRadius: BorderRadius.circular(25.0), 151 | border: Border.all( 152 | color: Colors.grey[500], width: 0.5), 153 | boxShadow: [ 154 | BoxShadow( 155 | color: Colors.black26, 156 | blurRadius: 14.0, 157 | offset: Offset(0, 6)) 158 | ]), 159 | child: Row( 160 | mainAxisAlignment: 161 | MainAxisAlignment.spaceBetween, 162 | children: [ 163 | IconButton( 164 | color: Theme.of(context).primaryColor, 165 | onPressed: () {}, 166 | icon: Icon(Icons.remove_circle), 167 | padding: EdgeInsets.zero, 168 | alignment: Alignment.centerLeft, 169 | iconSize: 34.0, 170 | ), 171 | Text( 172 | "1 Uni", 173 | style: TextStyle( 174 | color: 175 | Theme.of(context).primaryColor, 176 | fontWeight: FontWeight.bold), 177 | ), 178 | IconButton( 179 | color: Theme.of(context).primaryColor, 180 | onPressed: () {}, 181 | icon: Icon(Icons.add_circle), 182 | padding: EdgeInsets.zero, 183 | alignment: Alignment.centerRight, 184 | iconSize: 34.0, 185 | ), 186 | ], 187 | ), 188 | ), 189 | ], 190 | )) 191 | ], 192 | ), 193 | ), 194 | ), 195 | ), 196 | ), 197 | Container( 198 | padding: EdgeInsets.only( 199 | top: MediaQuery.of(context).size.height / 30.0, 200 | right: 10.0, 201 | left: 10.0), 202 | child: Container( 203 | width: MediaQuery.of(context).size.width, 204 | child: Card( 205 | shape: RoundedRectangleBorder( 206 | borderRadius: BorderRadius.circular(12.0)), 207 | color: Colors.white, 208 | elevation: 6.0, 209 | child: ExpansionTile( 210 | initiallyExpanded: true, 211 | title: Text( 212 | "Acompanhamentos", 213 | style: TextStyle( 214 | color: Theme.of(context).primaryColor, 215 | fontWeight: FontWeight.bold), 216 | ), 217 | children: [ 218 | Container( 219 | height: 200.0, 220 | padding: EdgeInsets.only( 221 | left: 16.0, 222 | right: 16.0, 223 | bottom: 10.0, 224 | top: 0.0), 225 | child: ListView( 226 | shrinkWrap: true, 227 | physics: AlwaysScrollableScrollPhysics(), 228 | children: [ 229 | Row( 230 | mainAxisAlignment: 231 | MainAxisAlignment.spaceBetween, 232 | children: [ 233 | Text( 234 | "Farofa", 235 | style: TextStyle( 236 | color: Colors.grey[500], 237 | fontSize: 16.0), 238 | ), 239 | Checkbox( 240 | onChanged: (value) {}, 241 | value: true, 242 | activeColor: 243 | Theme.of(context).primaryColor, 244 | checkColor: Colors.white, 245 | ) 246 | ], 247 | ), 248 | Divider( 249 | color: Theme.of(context).primaryColor, 250 | ), 251 | Row( 252 | mainAxisAlignment: 253 | MainAxisAlignment.spaceBetween, 254 | children: [ 255 | Text( 256 | "Mandioca Cozida", 257 | style: TextStyle( 258 | color: Colors.grey[500], 259 | fontSize: 16.0), 260 | ), 261 | Checkbox( 262 | onChanged: (value) {}, 263 | value: true, 264 | activeColor: 265 | Theme.of(context).primaryColor, 266 | checkColor: Colors.white, 267 | ) 268 | ], 269 | ), 270 | Divider( 271 | color: Theme.of(context).primaryColor, 272 | ), 273 | Row( 274 | mainAxisAlignment: 275 | MainAxisAlignment.spaceBetween, 276 | children: [ 277 | Text( 278 | "Geleia de Pimenta", 279 | style: TextStyle( 280 | color: Colors.grey[500], 281 | fontSize: 16.0), 282 | ), 283 | Checkbox( 284 | onChanged: (value) {}, 285 | value: false, 286 | activeColor: 287 | Theme.of(context).primaryColor, 288 | checkColor: Colors.white, 289 | ) 290 | ], 291 | ), 292 | Divider( 293 | color: Theme.of(context).primaryColor, 294 | ), 295 | Row( 296 | mainAxisAlignment: 297 | MainAxisAlignment.spaceBetween, 298 | children: [ 299 | Text( 300 | "Fritas", 301 | style: TextStyle( 302 | color: Colors.grey[500], 303 | fontSize: 16.0), 304 | ), 305 | Checkbox( 306 | onChanged: (value) {}, 307 | value: false, 308 | activeColor: 309 | Theme.of(context).primaryColor, 310 | checkColor: Colors.white, 311 | ) 312 | ], 313 | ), 314 | ], 315 | ), 316 | ) 317 | ], 318 | ), 319 | ), 320 | ), 321 | ), 322 | SizedBox( 323 | height: 20.0, 324 | ), 325 | Container( 326 | padding: EdgeInsets.all(20.0), 327 | child: RaisedButton( 328 | onPressed: () {}, 329 | shape: RoundedRectangleBorder( 330 | borderRadius: BorderRadius.circular(14.0)), 331 | padding: EdgeInsets.all(0.0), 332 | child: Ink( 333 | decoration: BoxDecoration( 334 | borderRadius: BorderRadius.circular(14.0), 335 | color: Theme.of(context).primaryColor), 336 | child: Container( 337 | constraints: BoxConstraints( 338 | maxWidth: 400.0, minHeight: 55.0), 339 | alignment: Alignment.center, 340 | child: Row( 341 | mainAxisAlignment: MainAxisAlignment.center, 342 | children: [ 343 | Icon( 344 | Icons.shopping_cart, 345 | color: Colors.white, 346 | size: 30.0, 347 | ), 348 | SizedBox( 349 | width: 30.0, 350 | ), 351 | Text( 352 | "Adicionar ao Carrinho", 353 | textAlign: TextAlign.center, 354 | style: TextStyle( 355 | color: Colors.white, 356 | fontSize: 16.0, 357 | ), 358 | ) 359 | ], 360 | )), 361 | )), 362 | ), 363 | ], 364 | ) 365 | ], 366 | )); 367 | } 368 | } 369 | -------------------------------------------------------------------------------- /lib/view/Screens/cart_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:delivery_app/view/Widgets/custom_order_dialog.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | 5 | class CartScreen extends StatelessWidget { 6 | //Card List Local Image Test 7 | List imagesListURL = [ 8 | "https://images.pexels.com/photos/410648/pexels-photo-410648.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 9 | "https://images.pexels.com/photos/3821692/pexels-photo-3821692.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 10 | "https://images.pexels.com/photos/266541/pexels-photo-266541.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 11 | ]; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | backgroundColor: Colors.white, 17 | body: SafeArea( 18 | child: ListView( 19 | padding: EdgeInsets.only( 20 | left: 12.0, right: 12.0, top: 40.0, bottom: 0.0), 21 | children: [ 22 | Card( 23 | shape: RoundedRectangleBorder( 24 | borderRadius: BorderRadius.circular(12.0)), 25 | elevation: 6.0, 26 | child: Container( 27 | padding: EdgeInsets.all(12.0), 28 | child: Row( 29 | children: [ 30 | Container( 31 | width: 180.0, 32 | height: 140.0, 33 | decoration: BoxDecoration( 34 | image: DecorationImage( 35 | image: NetworkImage(imagesListURL[1]), 36 | fit: BoxFit.fill), 37 | borderRadius: BorderRadius.circular(12.0)), 38 | ), 39 | SizedBox( 40 | width: 15.0, 41 | ), 42 | Flexible( 43 | child: Column( 44 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 45 | crossAxisAlignment: CrossAxisAlignment.start, 46 | children: [ 47 | Row( 48 | mainAxisAlignment: 49 | MainAxisAlignment.spaceBetween, 50 | children: [ 51 | Text( 52 | "Costela de boi", 53 | style: TextStyle( 54 | color: Theme.of(context).primaryColor, 55 | fontWeight: FontWeight.bold, 56 | fontSize: 16.0), 57 | ), 58 | Icon( 59 | Icons.delete, 60 | color: Theme.of(context).primaryColor, 61 | ) 62 | ], 63 | ), 64 | SizedBox( 65 | height: 4.0, 66 | ), 67 | Text( 68 | "Farofa, mandioca cozida", 69 | style: TextStyle(color: Colors.grey[500]), 70 | ), 71 | SizedBox( 72 | height: 4.0, 73 | ), 74 | Text( 75 | "Qtd: 1", 76 | style: TextStyle(color: Colors.grey[500]), 77 | ), 78 | SizedBox( 79 | height: 4.0, 80 | ), 81 | Row( 82 | children: [ 83 | Icon( 84 | Icons.restaurant_menu, 85 | color: Colors.grey[500], 86 | ), 87 | Text( 88 | "- 3 pessoas", 89 | style: TextStyle(color: Colors.grey[500]), 90 | ) 91 | ], 92 | ), 93 | SizedBox( 94 | height: 4.0, 95 | ), 96 | Text( 97 | "R\$ 49.99", 98 | style: TextStyle( 99 | color: Theme.of(context).primaryColor, 100 | fontWeight: FontWeight.bold, 101 | fontSize: 16.0), 102 | ), 103 | SizedBox( 104 | height: 4.0, 105 | ), 106 | Row( 107 | children: [ 108 | Icon( 109 | Icons.star, 110 | size: 20.0, 111 | color: Colors.grey[500], 112 | ), 113 | Icon(Icons.star, 114 | size: 20.0, color: Colors.grey[500]), 115 | Icon(Icons.star, 116 | size: 20.0, color: Colors.grey[500]), 117 | Icon(Icons.star, 118 | size: 20.0, color: Colors.grey[500]), 119 | Icon(Icons.star_half, 120 | size: 20.0, color: Colors.grey[500]), 121 | SizedBox( 122 | width: 8.0, 123 | ), 124 | Text("4.5") 125 | ], 126 | ), 127 | ], 128 | ), 129 | ) 130 | ], 131 | ), 132 | )), 133 | SizedBox( 134 | height: 10.0, 135 | ), 136 | Card( 137 | shape: RoundedRectangleBorder( 138 | borderRadius: BorderRadius.circular(12.0)), 139 | elevation: 6.0, 140 | child: Container( 141 | padding: EdgeInsets.all(12.0), 142 | child: Row( 143 | children: [ 144 | Container( 145 | width: 180.0, 146 | height: 140.0, 147 | decoration: BoxDecoration( 148 | image: DecorationImage( 149 | image: NetworkImage(imagesListURL[0]), 150 | fit: BoxFit.fill), 151 | borderRadius: BorderRadius.circular(12.0)), 152 | ), 153 | SizedBox( 154 | width: 15.0, 155 | ), 156 | Flexible( 157 | child: Column( 158 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 159 | crossAxisAlignment: CrossAxisAlignment.start, 160 | children: [ 161 | Row( 162 | mainAxisAlignment: 163 | MainAxisAlignment.spaceBetween, 164 | children: [ 165 | Text( 166 | "Costela de porco", 167 | style: TextStyle( 168 | color: Theme.of(context).primaryColor, 169 | fontWeight: FontWeight.bold, 170 | fontSize: 16.0), 171 | ), 172 | Icon( 173 | Icons.delete, 174 | color: Theme.of(context).primaryColor, 175 | ) 176 | ], 177 | ), 178 | SizedBox( 179 | height: 4.0, 180 | ), 181 | Text( 182 | "Fritas", 183 | style: TextStyle(color: Colors.grey[500]), 184 | ), 185 | SizedBox( 186 | height: 4.0, 187 | ), 188 | Text( 189 | "Qtd: 2", 190 | style: TextStyle(color: Colors.grey[500]), 191 | ), 192 | SizedBox( 193 | height: 4.0, 194 | ), 195 | Row( 196 | children: [ 197 | Icon( 198 | Icons.restaurant_menu, 199 | color: Colors.grey[500], 200 | ), 201 | Text( 202 | "- 2 pessoas", 203 | style: TextStyle(color: Colors.grey[500]), 204 | ) 205 | ], 206 | ), 207 | SizedBox( 208 | height: 4.0, 209 | ), 210 | Text( 211 | "R\$ 39.99", 212 | style: TextStyle( 213 | color: Theme.of(context).primaryColor, 214 | fontWeight: FontWeight.bold, 215 | fontSize: 16.0), 216 | ), 217 | SizedBox( 218 | height: 4.0, 219 | ), 220 | Row( 221 | children: [ 222 | Icon( 223 | Icons.star, 224 | size: 20.0, 225 | color: Colors.grey[500], 226 | ), 227 | Icon(Icons.star, 228 | size: 20.0, color: Colors.grey[500]), 229 | Icon(Icons.star, 230 | size: 20.0, color: Colors.grey[500]), 231 | Icon(Icons.star, 232 | size: 20.0, color: Colors.grey[500]), 233 | Icon(Icons.star_half, 234 | size: 20.0, color: Colors.grey[500]), 235 | SizedBox( 236 | width: 8.0, 237 | ), 238 | Text("4.5") 239 | ], 240 | ), 241 | ], 242 | ), 243 | ) 244 | ], 245 | ), 246 | )), 247 | SizedBox( 248 | height: 10.0, 249 | ), 250 | Card( 251 | shape: RoundedRectangleBorder( 252 | borderRadius: BorderRadius.circular(12.0)), 253 | elevation: 6.0, 254 | child: ExpansionTile( 255 | initiallyExpanded: false, 256 | leading: Icon( 257 | Icons.local_offer, 258 | color: Theme.of(context).primaryColor, 259 | ), 260 | title: Text( 261 | "Cupom", 262 | style: TextStyle(color: Colors.grey[500], fontSize: 18.0), 263 | ), 264 | children: [ 265 | Padding( 266 | padding: EdgeInsets.only( 267 | left: 16.0, right: 16.0, bottom: 10.0, top: 0.0), 268 | child: TextFormField( 269 | decoration: InputDecoration( 270 | focusedBorder: OutlineInputBorder( 271 | borderSide: BorderSide( 272 | color: Theme.of(context).primaryColor, 273 | )), 274 | border: OutlineInputBorder(), 275 | hintText: "Digite seu cupom", 276 | hintStyle: TextStyle(color: Colors.grey[400])), 277 | ), 278 | ) 279 | ], 280 | ), 281 | ), 282 | SizedBox( 283 | height: 10.0, 284 | ), 285 | Card( 286 | shape: RoundedRectangleBorder( 287 | borderRadius: BorderRadius.circular(12.0)), 288 | elevation: 6.0, 289 | child: ExpansionTile( 290 | initiallyExpanded: false, 291 | leading: Icon( 292 | Icons.credit_card, 293 | color: Theme.of(context).primaryColor, 294 | ), 295 | title: Text( 296 | "Forma de Pagamento", 297 | style: TextStyle(color: Colors.grey[500], fontSize: 18.0), 298 | ), 299 | children: [ 300 | Padding( 301 | padding: EdgeInsets.only( 302 | left: 16.0, right: 16.0, bottom: 10.0, top: 0.0), 303 | ) 304 | ], 305 | ), 306 | ), 307 | SizedBox( 308 | height: 10.0, 309 | ), 310 | Container( 311 | //height: MediaQuery.of(context).size.height * 0.2, 312 | padding: EdgeInsets.all(14.0), 313 | decoration: BoxDecoration( 314 | color: Colors.white, 315 | borderRadius: BorderRadius.only( 316 | topLeft: Radius.circular(12.0), 317 | topRight: Radius.circular(12.0)), 318 | boxShadow: [ 319 | BoxShadow( 320 | color: Colors.black26, 321 | blurRadius: 10.0, 322 | offset: Offset(0, 6)) 323 | ], 324 | ), 325 | child: Column( 326 | mainAxisSize: MainAxisSize.max, 327 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 328 | crossAxisAlignment: CrossAxisAlignment.start, 329 | children: [ 330 | Text( 331 | "Informações", 332 | style: TextStyle( 333 | color: Colors.grey[500], 334 | fontWeight: FontWeight.bold, 335 | fontSize: 16.0), 336 | ), 337 | SizedBox( 338 | height: 25.0, 339 | ), 340 | Row( 341 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 342 | children: [ 343 | Text("Subtotal", 344 | style: TextStyle( 345 | color: Colors.grey[500], 346 | )), 347 | Text( 348 | "129.97 R\$", 349 | style: 350 | TextStyle(color: Theme.of(context).primaryColor), 351 | ) 352 | ], 353 | ), 354 | Divider( 355 | color: Colors.grey[500], 356 | thickness: 0.6, 357 | ), 358 | Row( 359 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 360 | children: [ 361 | Text("Desconto", 362 | style: TextStyle( 363 | color: Colors.grey[500], 364 | )), 365 | Text( 366 | "-12.99 R\$", 367 | style: 368 | TextStyle(color: Theme.of(context).primaryColor), 369 | ) 370 | ], 371 | ), 372 | Divider( 373 | color: Colors.grey[500], 374 | thickness: 0.6, 375 | ), 376 | Row( 377 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 378 | children: [ 379 | Text("Entrega", 380 | style: TextStyle( 381 | color: Colors.grey[500], 382 | )), 383 | Text( 384 | "4.99 R\$", 385 | style: 386 | TextStyle(color: Theme.of(context).primaryColor), 387 | ) 388 | ], 389 | ), 390 | SizedBox( 391 | height: 40.0, 392 | ), 393 | Row( 394 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 395 | children: [ 396 | Text("TOTAL", 397 | style: TextStyle( 398 | color: Colors.grey[500], 399 | fontSize: 16.0, 400 | fontWeight: FontWeight.bold)), 401 | Text( 402 | "121.97 R\$", 403 | style: TextStyle( 404 | color: Theme.of(context).primaryColor, 405 | fontSize: 16.0, 406 | fontWeight: FontWeight.bold), 407 | ) 408 | ], 409 | ), 410 | SizedBox( 411 | height: 25.0, 412 | ), 413 | Container( 414 | padding: EdgeInsets.only(left: 24.0, right: 24.0), 415 | constraints: 416 | BoxConstraints(maxWidth: 350.0, minHeight: 60.0), 417 | child: OutlineButton( 418 | padding: EdgeInsets.only(left: 40.0, right: 40.0), 419 | color: Color.fromARGB(255, 217, 69, 65), 420 | child: Tab( 421 | icon: Container( 422 | child: Row( 423 | mainAxisAlignment: 424 | MainAxisAlignment.center, 425 | children: [ 426 | Text( 427 | "Finalizar compra", 428 | style: TextStyle(color: Theme.of(context).primaryColor, fontSize: 16.0), 429 | ) 430 | ], 431 | ), 432 | ), 433 | ), 434 | highlightedBorderColor: Theme.of(context).primaryColor, 435 | borderSide: BorderSide( 436 | color: Theme.of(context).primaryColor, width: 2), 437 | shape: StadiumBorder(), 438 | onPressed: () { 439 | showDialog(context: context, builder: (context)=> OrderDialog()); 440 | }), 441 | ), 442 | ], 443 | ), 444 | ) 445 | ], 446 | ), 447 | )); 448 | } 449 | } 450 | -------------------------------------------------------------------------------- /lib/view/Tiles/food_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:delivery_app/view/Screens/food_info_screen.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:hexcolor/hexcolor.dart'; 4 | 5 | class FoodTile extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | //Card List Local Image Test 9 | List imagesListURL = [ 10 | "https://images.pexels.com/photos/410648/pexels-photo-410648.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 11 | "https://images.pexels.com/photos/3821692/pexels-photo-3821692.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 12 | "https://images.pexels.com/photos/106343/pexels-photo-106343.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", 13 | ]; 14 | 15 | return Container( 16 | height: 300.0, 17 | margin: EdgeInsets.symmetric(horizontal: 16.0), 18 | child: ListView( 19 | shrinkWrap: true, 20 | physics: AlwaysScrollableScrollPhysics(), 21 | children: [ 22 | Card( 23 | shape: RoundedRectangleBorder( 24 | borderRadius: BorderRadius.circular(12.0)), 25 | elevation: 6.0, 26 | color: Colors.white, 27 | child: Container( 28 | padding: EdgeInsets.all(12.0), 29 | child: Row( 30 | children: [ 31 | Container( 32 | width: 150.0, 33 | height: 110.0, 34 | decoration: BoxDecoration( 35 | image: DecorationImage( 36 | image: NetworkImage(imagesListURL[0]), 37 | fit: BoxFit.fill), 38 | borderRadius: BorderRadius.circular(12.0)), 39 | ), 40 | SizedBox( 41 | width: 20.0, 42 | ), 43 | Container( 44 | child: Flexible( 45 | child: Column( 46 | crossAxisAlignment: CrossAxisAlignment.start, 47 | children: [ 48 | Row( 49 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 50 | children: [ 51 | Text( 52 | "Costela de Porco", 53 | style: TextStyle(fontWeight: FontWeight.bold), 54 | ), 55 | Icon( 56 | Icons.favorite_border, 57 | color: Theme.of(context).primaryColor, 58 | size: 28.0, 59 | ) 60 | ], 61 | ), 62 | SizedBox( 63 | height: 4.0, 64 | ), 65 | Row( 66 | children: [ 67 | Icon( 68 | Icons.star, 69 | size: 20.0, 70 | color: Colors.grey[500], 71 | ), 72 | Icon(Icons.star, 73 | size: 20.0, color: Colors.grey[500]), 74 | Icon(Icons.star, 75 | size: 20.0, color: Colors.grey[500]), 76 | Icon(Icons.star, 77 | size: 20.0, color: Colors.grey[500]), 78 | Icon(Icons.star_half, 79 | size: 20.0, color: Colors.grey[500]), 80 | SizedBox( 81 | width: 8.0, 82 | ), 83 | Text("4.5") 84 | ], 85 | ), 86 | SizedBox( 87 | height: 4.0, 88 | ), 89 | Container( 90 | width: 170.0, 91 | height: 45.0, 92 | decoration: BoxDecoration( 93 | borderRadius: BorderRadius.circular(12.0), 94 | boxShadow: [ 95 | BoxShadow( 96 | color: Colors.black38, 97 | blurRadius: 10.0, 98 | offset: Offset(0, 6)) 99 | ]), 100 | child: Row( 101 | children: [ 102 | Container( 103 | alignment: Alignment.center, 104 | width: 85.0, 105 | height: 45.0, 106 | decoration: BoxDecoration( 107 | color: Theme.of(context).primaryColor, 108 | borderRadius: BorderRadius.only( 109 | topLeft: Radius.circular(8.0), 110 | bottomLeft: Radius.circular(8.0))), 111 | child: Text( 112 | "R\$ 39.99", 113 | style: TextStyle( 114 | color: Colors.white, 115 | fontWeight: FontWeight.bold), 116 | ), 117 | ), 118 | Container( 119 | alignment: Alignment.center, 120 | width: 85.0, 121 | height: 45.0, 122 | decoration: BoxDecoration( 123 | color: Hexcolor("#DE7386"), 124 | borderRadius: BorderRadius.only( 125 | topRight: Radius.circular(8.0), 126 | bottomRight: 127 | Radius.circular(8.0))), 128 | child: FlatButton( 129 | onPressed: () { 130 | Navigator.of(context).push( 131 | MaterialPageRoute( 132 | builder: (context) => 133 | FoodInfoScreen())); 134 | }, 135 | child: Text( 136 | "ADD", 137 | style: TextStyle( 138 | color: Colors.white, 139 | fontWeight: FontWeight.bold), 140 | ), 141 | )), 142 | ], 143 | ), 144 | ), 145 | ], 146 | ), 147 | ) 148 | ), 149 | ], 150 | ), 151 | )), 152 | SizedBox( 153 | height: 10.0, 154 | ), 155 | Card( 156 | shape: RoundedRectangleBorder( 157 | borderRadius: BorderRadius.circular(12.0)), 158 | elevation: 6.0, 159 | color: Colors.white, 160 | child: Container( 161 | padding: EdgeInsets.all(12.0), 162 | child: Row( 163 | children: [ 164 | Container( 165 | width: 150.0, 166 | height: 110.0, 167 | decoration: BoxDecoration( 168 | image: DecorationImage( 169 | image: NetworkImage(imagesListURL[1]), 170 | fit: BoxFit.fill), 171 | borderRadius: BorderRadius.circular(12.0)), 172 | ), 173 | SizedBox( 174 | width: 20.0, 175 | ), 176 | Container( 177 | child: Flexible( 178 | child: Column( 179 | crossAxisAlignment: CrossAxisAlignment.start, 180 | children: [ 181 | Row( 182 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 183 | children: [ 184 | Text( 185 | "Costela de Boi ", 186 | style: TextStyle(fontWeight: FontWeight.bold), 187 | ), 188 | Icon( 189 | Icons.favorite_border, 190 | color: Theme.of(context).primaryColor, 191 | size: 28.0, 192 | ) 193 | ], 194 | ), 195 | SizedBox( 196 | height: 4.0, 197 | ), 198 | Row( 199 | children: [ 200 | Icon( 201 | Icons.star, 202 | size: 20.0, 203 | color: Colors.grey[500], 204 | ), 205 | Icon(Icons.star, 206 | size: 20.0, color: Colors.grey[500]), 207 | Icon(Icons.star, 208 | size: 20.0, color: Colors.grey[500]), 209 | Icon(Icons.star, 210 | size: 20.0, color: Colors.grey[500]), 211 | Icon(Icons.star_half, 212 | size: 20.0, color: Colors.grey[500]), 213 | SizedBox( 214 | width: 8.0, 215 | ), 216 | Text("4.5") 217 | ], 218 | ), 219 | SizedBox( 220 | height: 4.0, 221 | ), 222 | Container( 223 | width: 170.0, 224 | height: 45.0, 225 | decoration: BoxDecoration( 226 | borderRadius: BorderRadius.circular(12.0), 227 | boxShadow: [ 228 | BoxShadow( 229 | color: Colors.black38, 230 | blurRadius: 10.0, 231 | offset: Offset(0, 6)) 232 | ]), 233 | child: Row( 234 | children: [ 235 | Container( 236 | alignment: Alignment.center, 237 | width: 85.0, 238 | height: 45.0, 239 | decoration: BoxDecoration( 240 | color: Theme.of(context).primaryColor, 241 | borderRadius: BorderRadius.only( 242 | topLeft: Radius.circular(8.0), 243 | bottomLeft: Radius.circular(8.0))), 244 | child: Text( 245 | "R\$ 49.99", 246 | style: TextStyle( 247 | color: Colors.white, 248 | fontWeight: FontWeight.bold), 249 | ), 250 | ), 251 | Container( 252 | alignment: Alignment.center, 253 | width: 85.0, 254 | height: 45.0, 255 | decoration: BoxDecoration( 256 | color: Hexcolor("#DE7386"), 257 | borderRadius: BorderRadius.only( 258 | topRight: Radius.circular(8.0), 259 | bottomRight: 260 | Radius.circular(8.0))), 261 | child: FlatButton( 262 | onPressed: () {}, 263 | child: Text( 264 | "ADD", 265 | style: TextStyle( 266 | color: Colors.white, 267 | fontWeight: FontWeight.bold), 268 | ), 269 | )), 270 | ], 271 | ), 272 | ), 273 | ], 274 | ), 275 | ) 276 | ), 277 | ], 278 | ), 279 | )), 280 | SizedBox( 281 | height: 10.0, 282 | ), 283 | Card( 284 | shape: RoundedRectangleBorder( 285 | borderRadius: BorderRadius.circular(12.0)), 286 | elevation: 6.0, 287 | color: Colors.white, 288 | child: Container( 289 | padding: EdgeInsets.all(12.0), 290 | child: Row( 291 | children: [ 292 | Container( 293 | width: 150.0, 294 | height: 110.0, 295 | decoration: BoxDecoration( 296 | image: DecorationImage( 297 | image: NetworkImage(imagesListURL[2]), 298 | fit: BoxFit.fill), 299 | borderRadius: BorderRadius.circular(12.0)), 300 | ), 301 | SizedBox( 302 | width: 20.0, 303 | ), 304 | Container( 305 | child: Flexible( 306 | child: Column( 307 | crossAxisAlignment: CrossAxisAlignment.start, 308 | children: [ 309 | Row( 310 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 311 | children: [ 312 | Text( 313 | "Coxa de Frango ", 314 | style: TextStyle(fontWeight: FontWeight.bold), 315 | ), 316 | Icon( 317 | Icons.favorite_border, 318 | color: Theme.of(context).primaryColor, 319 | size: 28.0, 320 | ) 321 | ], 322 | ), 323 | SizedBox( 324 | height: 4.0, 325 | ), 326 | SizedBox( 327 | height: 4.0, 328 | ), 329 | Row( 330 | children: [ 331 | Icon( 332 | Icons.star, 333 | size: 20.0, 334 | color: Colors.grey[500], 335 | ), 336 | Icon(Icons.star, 337 | size: 20.0, color: Colors.grey[500]), 338 | Icon(Icons.star, 339 | size: 20.0, color: Colors.grey[500]), 340 | Icon(Icons.star, 341 | size: 20.0, color: Colors.grey[500]), 342 | Icon(Icons.star_half, 343 | size: 20.0, color: Colors.grey[500]), 344 | SizedBox( 345 | width: 8.0, 346 | ), 347 | Text("4.5") 348 | ], 349 | ), 350 | SizedBox( 351 | height: 4.0, 352 | ), 353 | Container( 354 | width: 170.0, 355 | height: 45.0, 356 | decoration: BoxDecoration( 357 | borderRadius: BorderRadius.circular(12.0), 358 | boxShadow: [ 359 | BoxShadow( 360 | color: Colors.black38, 361 | blurRadius: 10.0, 362 | offset: Offset(0, 6)) 363 | ]), 364 | child: Row( 365 | children: [ 366 | Container( 367 | alignment: Alignment.center, 368 | width: 85.0, 369 | height: 45.0, 370 | decoration: BoxDecoration( 371 | color: Theme.of(context).primaryColor, 372 | borderRadius: BorderRadius.only( 373 | topLeft: Radius.circular(8.0), 374 | bottomLeft: Radius.circular(8.0))), 375 | child: Text( 376 | "R\$ 29.99", 377 | style: TextStyle( 378 | color: Colors.white, 379 | fontWeight: FontWeight.bold), 380 | ), 381 | ), 382 | Container( 383 | alignment: Alignment.center, 384 | width: 85.0, 385 | height: 45.0, 386 | decoration: BoxDecoration( 387 | color: Hexcolor("#DE7386"), 388 | borderRadius: BorderRadius.only( 389 | topRight: Radius.circular(8.0), 390 | bottomRight: 391 | Radius.circular(8.0))), 392 | child: FlatButton( 393 | onPressed: () {}, 394 | child: Text( 395 | "ADD", 396 | style: TextStyle( 397 | color: Colors.white, 398 | fontWeight: FontWeight.bold), 399 | ), 400 | )), 401 | ], 402 | ), 403 | ), 404 | ], 405 | ), 406 | ) 407 | ), 408 | ], 409 | ), 410 | )), 411 | ], 412 | )); 413 | } 414 | } 415 | --------------------------------------------------------------------------------