├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.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 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcworkspace │ └── contents.xcworkspacedata ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj └── .gitignore ├── assets └── pics │ ├── food0.png │ ├── food1.png │ ├── food10.png │ ├── food11.png │ ├── food12.png │ ├── food13.png │ ├── food14.png │ ├── food15.png │ ├── food2.png │ ├── food3.png │ ├── food4.png │ ├── food5.png │ ├── food6.png │ ├── food7.png │ ├── food8.png │ └── food9.png ├── screenshots ├── Screenshot_20191002-161403.jpg ├── Screenshot_20191002-161416.jpg ├── Screenshot_20191002-161425.jpg ├── Screenshot_20191002-161436.jpg ├── Screenshot_20191002-161512.jpg └── Screenshot_20191002-161520.jpg ├── android ├── 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 │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── groceries │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── .metadata ├── lib ├── src │ ├── models │ │ └── food.dart │ ├── widgets │ │ ├── cart_tiles.dart │ │ ├── custom_title.dart │ │ ├── cart_item.dart │ │ ├── grid_item.dart │ │ ├── cart_title.dart │ │ ├── products_grid.dart │ │ └── cart_details.dart │ ├── providers │ │ ├── cart_provider.dart │ │ └── food_provider.dart │ └── pages │ │ ├── home_page.dart │ │ └── product_details.dart └── main.dart ├── .gitignore ├── README.md ├── pubspec.yaml └── pubspec.lock /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /assets/pics/food0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food0.png -------------------------------------------------------------------------------- /assets/pics/food1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food1.png -------------------------------------------------------------------------------- /assets/pics/food10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food10.png -------------------------------------------------------------------------------- /assets/pics/food11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food11.png -------------------------------------------------------------------------------- /assets/pics/food12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food12.png -------------------------------------------------------------------------------- /assets/pics/food13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food13.png -------------------------------------------------------------------------------- /assets/pics/food14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food14.png -------------------------------------------------------------------------------- /assets/pics/food15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food15.png -------------------------------------------------------------------------------- /assets/pics/food2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food2.png -------------------------------------------------------------------------------- /assets/pics/food3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food3.png -------------------------------------------------------------------------------- /assets/pics/food4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food4.png -------------------------------------------------------------------------------- /assets/pics/food5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food5.png -------------------------------------------------------------------------------- /assets/pics/food6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food6.png -------------------------------------------------------------------------------- /assets/pics/food7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food7.png -------------------------------------------------------------------------------- /assets/pics/food8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food8.png -------------------------------------------------------------------------------- /assets/pics/food9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/assets/pics/food9.png -------------------------------------------------------------------------------- /screenshots/Screenshot_20191002-161403.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/screenshots/Screenshot_20191002-161403.jpg -------------------------------------------------------------------------------- /screenshots/Screenshot_20191002-161416.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/screenshots/Screenshot_20191002-161416.jpg -------------------------------------------------------------------------------- /screenshots/Screenshot_20191002-161425.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/screenshots/Screenshot_20191002-161425.jpg -------------------------------------------------------------------------------- /screenshots/Screenshot_20191002-161436.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/screenshots/Screenshot_20191002-161436.jpg -------------------------------------------------------------------------------- /screenshots/Screenshot_20191002-161512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/screenshots/Screenshot_20191002-161512.jpg -------------------------------------------------------------------------------- /screenshots/Screenshot_20191002-161520.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/screenshots/Screenshot_20191002-161520.jpg -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/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/wmfadel/Groceries/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wmfadel/Groceries/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/wmfadel/Groceries/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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: 5caad71f1dce1db0e629dfbe1b33c9bddb3b602b 8 | channel: master 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/src/models/food.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | 3 | class Food { 4 | int id; 5 | String image; 6 | double price; 7 | double weight; 8 | String description; 9 | int amount = 0; 10 | 11 | Food({ 12 | @required this.id, 13 | @required this.image, 14 | @required this.price, 15 | @required this.weight, 16 | @required this.description, 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/groceries/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.groceries 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 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 | -------------------------------------------------------------------------------- /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/Generated.xcconfig 20 | Flutter/app.flx 21 | Flutter/app.zip 22 | Flutter/flutter_assets/ 23 | Flutter/flutter_export_environment.sh 24 | ServiceDefinitions.json 25 | Runner/GeneratedPluginRegistrant.* 26 | 27 | # Exceptions to above rules. 28 | !default.mode1v3 29 | !default.mode2v3 30 | !default.pbxuser 31 | !default.perspectivev3 32 | -------------------------------------------------------------------------------- /lib/src/widgets/cart_tiles.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:groceries/src/widgets/cart_title.dart'; 3 | 4 | class CartTiles extends StatelessWidget { 5 | double screenWidth, screenHeight; 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | Size size = MediaQuery.of(context).size; 10 | screenWidth = size.width; 11 | screenHeight = size.height; 12 | 13 | return Container( 14 | padding: EdgeInsets.only(left: 20, right: 20), 15 | width: screenWidth, 16 | height: 150, 17 | child: Column( 18 | children: [ 19 | CartTitle(), 20 | ], 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /.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 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Web related 33 | lib/generated_plugin_registrant.dart 34 | 35 | # Exceptions to above rules. 36 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 37 | -------------------------------------------------------------------------------- /lib/src/providers/cart_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:groceries/src/models/food.dart'; 3 | 4 | class CartProvider with ChangeNotifier { 5 | List _food = [ ]; 6 | 7 | List get food => _food; 8 | 9 | set food(List value) => _food = value; 10 | 11 | addFood(Food food) { 12 | bool isNew = true; 13 | _food.forEach((Food f) { 14 | if (f.id == food.id) { 15 | isNew = false; 16 | return; 17 | } 18 | }); 19 | if (isNew) _food.add(food); 20 | notifyListeners(); 21 | } 22 | 23 | removeFood(food) { 24 | _food.remove(food); 25 | notifyListeners(); 26 | } 27 | 28 | double getTotalPrice(){ 29 | double total = 0; 30 | if(_food != null){ 31 | _food.forEach((f){ 32 | total += f.amount * f.price; 33 | }); 34 | } 35 | return total; 36 | } 37 | } 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:flutter/material.dart'; 2 | import 'package:groceries/src/pages/home_page.dart'; 3 | import 'package:groceries/src/pages/product_details.dart'; 4 | import 'package:groceries/src/providers/cart_provider.dart'; 5 | import 'package:groceries/src/providers/food_provider.dart'; 6 | import 'package:provider/provider.dart'; 7 | 8 | void main() => runApp(App()); 9 | 10 | class App extends StatelessWidget { 11 | @override 12 | Widget build(BuildContext context) { 13 | return MultiProvider( 14 | providers: [ 15 | ChangeNotifierProvider.value(value: FoodProvider()), 16 | ChangeNotifierProvider.value(value: CartProvider()), 17 | ], 18 | child: MaterialApp( 19 | debugShowCheckedModeBanner: false, 20 | title: 'Groceries', 21 | routes: { 22 | HomePage.routeName: (context) => HomePage(), 23 | ProductDetails.routeName: (context) => ProductDetails(), 24 | }, 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/widgets/custom_title.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CustomTitle extends StatelessWidget { 5 | double screenWidth, screenHeight; 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | Size size = MediaQuery.of(context).size; 10 | screenWidth = size.width; 11 | screenHeight = size.height; 12 | 13 | return Container( 14 | width: screenWidth, 15 | height: 60, 16 | padding: EdgeInsets.only(top: 30,left: 20,right: 20), 17 | child: Row( 18 | mainAxisSize: MainAxisSize.max, 19 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 20 | children: [ 21 | Icon(CupertinoIcons.back), 22 | Text('Our products',style: TextStyle(fontWeight: FontWeight.bold,fontSize: 18),), 23 | Icon(Icons.bookmark_border), 24 | ], 25 | ), 26 | decoration: BoxDecoration( 27 | gradient: LinearGradient( 28 | colors: [ 29 | Color(0xffECE9DE), 30 | Color(0xffefebe9), 31 | ], 32 | begin: Alignment.topCenter, 33 | end: Alignment.bottomCenter, 34 | )), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # groceries 2 | 3 | A new Flutter application. 4 | 5 | - [Viedo for the current state of the application](https://youtu.be/smFNhm8rvDM) 6 | 7 | * [Original design by cuberto](https://dribbble.com/shots/6120171-Groceries-Shopping-App-Interaction) 8 | 9 | 10 | 11 | 12 | 13 | 14 | ## Getting Started 15 | 16 | This project is a starting point for a Flutter application. 17 | 18 | A few resources to get you started if this is your first Flutter project: 19 | 20 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 21 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 22 | 23 | For help getting started with Flutter, view our 24 | [online documentation](https://flutter.dev/docs), which offers tutorials, 25 | samples, guidance on mobile development, and a full API reference. 26 | -------------------------------------------------------------------------------- /lib/src/widgets/cart_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:groceries/src/models/food.dart'; 3 | 4 | class CartItem extends StatelessWidget { 5 | double screenWidth, screenHeight; 6 | Food _food; 7 | 8 | CartItem(this._food); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | Size size = MediaQuery.of(context).size; 13 | screenWidth = size.width; 14 | screenHeight = size.height; 15 | 16 | return Container( 17 | width: screenWidth, 18 | height: 60, 19 | margin: EdgeInsets.symmetric(vertical: 8), 20 | padding: EdgeInsets.symmetric(horizontal: 10), 21 | child: Row( 22 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 23 | crossAxisAlignment: CrossAxisAlignment.center, 24 | children: [ 25 | CircleAvatar( 26 | radius: 22, 27 | backgroundColor: Colors.white, 28 | backgroundImage: AssetImage(_food.image), 29 | ), 30 | Text('${_food.amount}', 31 | style: TextStyle(color: Colors.white, fontSize: 16)), 32 | Text('x', style: TextStyle(color: Colors.white, fontSize: 16)), 33 | Container( 34 | width: screenWidth * 0.5, 35 | child: Text('${_food.description}', 36 | maxLines: 2, 37 | overflow: TextOverflow.fade, 38 | style: TextStyle(color: Colors.white, fontSize: 16)), 39 | ), 40 | Text('\$${(_food.amount * _food.price).toStringAsFixed(2)}', 41 | style: TextStyle(color: Colors.white, fontSize: 16)), 42 | 43 | ], 44 | ), 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /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 | groceries 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/src/widgets/grid_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:groceries/src/models/food.dart'; 3 | import 'package:groceries/src/pages/product_details.dart'; 4 | 5 | class GridItem extends StatelessWidget { 6 | Food _food; 7 | 8 | GridItem(this._food); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return GestureDetector( 13 | onTap: () => Navigator.of(context).pushNamed(ProductDetails.routeName, 14 | arguments: {'id': _food.id}), 15 | child: Column( 16 | crossAxisAlignment: CrossAxisAlignment.start, 17 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 18 | children: [ 19 | Center( 20 | child: Hero( 21 | tag: '${_food.id}', 22 | child: Image.asset(_food.image, 23 | height: 125, fit: BoxFit.contain))), 24 | Padding( 25 | padding: const EdgeInsets.only(left: 10), 26 | child: Text('\$${_food.price}', 27 | style: TextStyle( 28 | color: Colors.black, 29 | fontSize: 20, 30 | fontWeight: FontWeight.bold)), 31 | ), 32 | Padding( 33 | padding: const EdgeInsets.symmetric(horizontal: 8), 34 | child: Text( 35 | _food.description, 36 | maxLines: 2, 37 | overflow: TextOverflow.ellipsis, 38 | style: TextStyle(color: Colors.black, fontSize: 15), 39 | ), 40 | ), 41 | Padding( 42 | padding: const EdgeInsets.only(left: 8, bottom: 8), 43 | child: Text('${_food.weight}g'), 44 | ) 45 | ], 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /lib/src/pages/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:groceries/src/widgets/cart_details.dart'; 3 | import 'package:groceries/src/widgets/cart_tiles.dart'; 4 | import 'package:groceries/src/widgets/products_grid.dart'; 5 | 6 | class HomePage extends StatefulWidget { 7 | static final String routeName = '/'; 8 | 9 | @override 10 | _HomePageState createState() => _HomePageState(); 11 | } 12 | 13 | class _HomePageState extends State { 14 | double screenWidth, screenHeight; 15 | bool shouldHide = false; 16 | ScrollController _controller = ScrollController(); 17 | 18 | scrollListeners() { 19 | _controller.addListener(() { 20 | if (_controller.position.pixels == 21 | _controller.position.maxScrollExtent && !shouldHide) { 22 | setState(() { 23 | shouldHide = true; 24 | print('scrollng :$shouldHide!!'); 25 | }); 26 | } 27 | }); 28 | 29 | _controller.addListener(() { 30 | if (_controller.position.pixels == 31 | _controller.position.minScrollExtent && shouldHide) { 32 | setState(() { 33 | shouldHide = false; 34 | print('scrollng :$shouldHide!!'); 35 | }); 36 | } 37 | }); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | Size size = MediaQuery.of(context).size; 43 | screenWidth = size.width; 44 | screenHeight = size.height; 45 | 46 | scrollListeners(); 47 | 48 | return Scaffold( 49 | backgroundColor: Color(0xff030303), 50 | body: Container( 51 | width: screenWidth, 52 | height: screenHeight, 53 | child: ListView( 54 | controller: _controller, 55 | children: [ 56 | ProductsGrid(), 57 | SizedBox(height: 10), 58 | shouldHide ? CartDetails() : CartTiles(), 59 | ], 60 | ), 61 | ), 62 | ); 63 | } 64 | } 65 | /* 66 | ECE9DE light 67 | CBC3AF darkish 68 | */ 69 | -------------------------------------------------------------------------------- /lib/src/widgets/cart_title.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:groceries/src/providers/cart_provider.dart'; 3 | import 'package:provider/provider.dart'; 4 | 5 | class CartTitle extends StatelessWidget { 6 | double screenWidth, screenHeight; 7 | CartProvider _provider; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | Size size = MediaQuery.of(context).size; 12 | screenWidth = size.width; 13 | screenHeight = size.height; 14 | 15 | _provider = Provider.of(context); 16 | return Container( 17 | height: 80, 18 | child: Row(children: [ 19 | Text( 20 | 'Cart', 21 | style: TextStyle( 22 | color: Colors.white, fontWeight: FontWeight.bold, fontSize: 20), 23 | ), 24 | Container( 25 | margin: EdgeInsets.only(left: 10), 26 | width: screenWidth - 170, 27 | height: 55, 28 | child: ListView.builder( 29 | itemCount: _provider.food.length, 30 | scrollDirection: Axis.horizontal, 31 | itemBuilder: (BuildContext context, int index) { 32 | return Container( 33 | margin: EdgeInsets.symmetric(horizontal: 4), 34 | child: CircleAvatar( 35 | backgroundColor: Colors.white, 36 | backgroundImage: AssetImage(_provider.food[index].image), 37 | ), 38 | ); 39 | }, 40 | ), 41 | ), 42 | SizedBox(width: 10), 43 | Container( 44 | width: 60, 45 | height: 60, 46 | decoration: BoxDecoration( 47 | shape: BoxShape.circle, 48 | color: Colors.amber[600], 49 | ), 50 | child: CircleAvatar( 51 | child: Text( 52 | '${_provider.food.length}', 53 | style: 54 | TextStyle(color: Colors.black, fontWeight: FontWeight.bold), 55 | ), 56 | backgroundColor: Colors.amber[600], 57 | ), 58 | ), 59 | ]), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /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 GradleException("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 plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.groceries" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'androidx.test:runner:1.1.1' 66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 67 | } 68 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/src/widgets/products_grid.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:groceries/src/providers/food_provider.dart'; 3 | import 'package:groceries/src/widgets/custom_title.dart'; 4 | import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; 5 | import 'package:groceries/src/widgets/grid_item.dart'; 6 | import 'package:provider/provider.dart'; 7 | 8 | class ProductsGrid extends StatelessWidget { 9 | double screenWidth, screenHeight; 10 | 11 | FoodProvider _provider; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | Size size = MediaQuery.of(context).size; 16 | screenWidth = size.width; 17 | screenHeight = size.height; 18 | _provider = Provider.of(context); 19 | 20 | return ClipRRect( 21 | borderRadius: BorderRadius.only( 22 | bottomLeft: Radius.circular(35), 23 | bottomRight: Radius.circular(35), 24 | ), 25 | child: Container( 26 | height: screenHeight - 125, 27 | width: screenWidth, 28 | decoration: BoxDecoration( 29 | color: Color(0xffECE9DE), 30 | borderRadius: BorderRadius.only( 31 | bottomLeft: Radius.circular(35), 32 | bottomRight: Radius.circular(35), 33 | ), 34 | ), 35 | child: Stack( 36 | children: [ 37 | Container( 38 | padding: EdgeInsets.only(top: 70,bottom: 5), 39 | width: screenWidth, 40 | child: StaggeredGridView.countBuilder( 41 | crossAxisCount: 4, 42 | itemCount: _provider.food.length + 1, 43 | itemBuilder: (BuildContext context, int index) => new Container( 44 | margin: EdgeInsets.only( 45 | left: index % 2 == 0 ? 10 : 0, 46 | right: index % 2 == 0 ? 0 : 10, 47 | ), 48 | decoration: BoxDecoration( 49 | color: Colors.white, 50 | borderRadius: BorderRadius.circular(25)), 51 | child: index == 0 52 | ? Image.asset('assets/pics/food7.png', 53 | fit: BoxFit.contain) 54 | : new Center( 55 | child: GridItem(_provider.food[index - 1]), 56 | )), 57 | staggeredTileBuilder: (int index) => 58 | new StaggeredTile.count(2, index == 0 ? 2 : 3), 59 | mainAxisSpacing: 10, 60 | crossAxisSpacing: 10, 61 | ), 62 | ), 63 | CustomTitle(), 64 | ], 65 | ), 66 | ), 67 | ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: groceries 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 | cupertino_icons: ^0.1.2 26 | provider: ^3.1.0 27 | flutter_staggered_grid_view: ^0.3.0 28 | 29 | dev_dependencies: 30 | flutter_test: 31 | sdk: flutter 32 | 33 | 34 | # For information on the generic Dart part of this file, see the 35 | # following page: https://dart.dev/tools/pub/pubspec 36 | 37 | # The following section is specific to Flutter. 38 | flutter: 39 | 40 | # The following line ensures that the Material Icons font is 41 | # included with your application, so that you can use the icons in 42 | # the material Icons class. 43 | uses-material-design: true 44 | 45 | # To add assets to your application, add an assets section, like this: 46 | assets: 47 | - assets/pics/ 48 | # - images/a_dot_ham.jpeg 49 | 50 | # An image asset can refer to one or more resolution-specific "variants", see 51 | # https://flutter.dev/assets-and-images/#resolution-aware. 52 | 53 | # For details regarding adding assets from package dependencies, see 54 | # https://flutter.dev/assets-and-images/#from-packages 55 | 56 | # To add custom fonts to your application, add a fonts section here, 57 | # in this "flutter" section. Each entry in this list should have a 58 | # "family" key with the font family name, and a "fonts" key with a 59 | # list giving the asset and other descriptors for the font. For 60 | # example: 61 | # fonts: 62 | # - family: Schyler 63 | # fonts: 64 | # - asset: fonts/Schyler-Regular.ttf 65 | # - asset: fonts/Schyler-Italic.ttf 66 | # style: italic 67 | # - family: Trajan Pro 68 | # fonts: 69 | # - asset: fonts/TrajanPro.ttf 70 | # - asset: fonts/TrajanPro_Bold.ttf 71 | # weight: 700 72 | # 73 | # For details regarding fonts from package dependencies, 74 | # see https://flutter.dev/custom-fonts/#from-packages 75 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/src/providers/food_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:groceries/src/models/food.dart'; 3 | import 'package:provider/provider.dart'; 4 | 5 | class FoodProvider with ChangeNotifier { 6 | List _food = getFood(); 7 | 8 | List get food => _food; 9 | set food(List value) =>_food = value; 10 | 11 | 12 | 13 | } 14 | 15 | getFood(){ 16 | return [ 17 | Food( 18 | id: 0, 19 | image: 'assets/pics/food0.png', 20 | price: 14.99, 21 | weight: 900, 22 | description: 'Lorem Ipsum is simply dummy text of the printing'), 23 | Food( 24 | id: 1, 25 | image: 'assets/pics/food1.png', 26 | price: 8.99, 27 | weight: 500, 28 | description: 'Lorem Ipsum is simply dummy text of the printing'), 29 | Food( 30 | id: 2, 31 | image: 'assets/pics/food2.png', 32 | price: 14.00, 33 | weight: 500, 34 | description: 'Lorem Ipsum is simply dummy text of the printing'), 35 | Food( 36 | id: 3, 37 | image: 'assets/pics/food3.png', 38 | price: 12.99, 39 | weight: 350, 40 | description: 'Lorem Ipsum is simply dummy text of the printing'), 41 | Food( 42 | id: 4, 43 | image: 'assets/pics/food4.png', 44 | price: 4.99, 45 | weight: 400, 46 | description: 'Lorem Ipsum is simply dummy text of the printing'), 47 | Food( 48 | id: 5, 49 | image: 'assets/pics/food5.png', 50 | price: 6.99, 51 | weight: 500, 52 | description: 'Lorem Ipsum is simply dummy text of the printing'), 53 | Food( 54 | id: 6, 55 | image: 'assets/pics/food6.png', 56 | price: 17.99, 57 | weight: 670, 58 | description: 'Lorem Ipsum is simply dummy text of the printing'), 59 | Food( 60 | id: 7, 61 | image: 'assets/pics/food7.png', 62 | price: 28.99, 63 | weight: 100, 64 | description: 'Lorem Ipsum is simply dummy text of the printing'), 65 | Food( 66 | id: 8, 67 | image: 'assets/pics/food8.png', 68 | price: 65.99, 69 | weight: 300, 70 | description: 'Lorem Ipsum is simply dummy text of the printing'), 71 | Food( 72 | id: 9, 73 | image: 'assets/pics/food9.png', 74 | price: 47.99, 75 | weight: 800, 76 | description: 'Lorem Ipsum is simply dummy text of the printing'), 77 | Food( 78 | id: 10, 79 | image: 'assets/pics/food10.png', 80 | price: 5.99, 81 | weight: 450, 82 | description: 'Lorem Ipsum is simply dummy text of the printing'), 83 | Food( 84 | id: 11, 85 | image: 'assets/pics/food11.png', 86 | price: 57.99, 87 | weight: 650, 88 | description: 'Lorem Ipsum is simply dummy text of the printing'), 89 | Food( 90 | id: 12, 91 | image: 'assets/pics/food12.png', 92 | price: 68.99, 93 | weight: 600, 94 | description: 'Lorem Ipsum is simply dummy text of the printing'), 95 | Food( 96 | id: 13, 97 | image: 'assets/pics/food13.png', 98 | price: 74.99, 99 | weight: 750, 100 | description: 'Lorem Ipsum is simply dummy text of the printing'), 101 | Food( 102 | id: 14, 103 | image: 'assets/pics/food14.png', 104 | price: 55.99, 105 | weight: 700, 106 | description: 'Lorem Ipsum is simply dummy text of the printing'), 107 | Food( 108 | id: 15, 109 | image: 'assets/pics/food15.png', 110 | price: 32.99, 111 | weight: 800, 112 | description: 'Lorem Ipsum is simply dummy text of the printing'), 113 | ]; 114 | } -------------------------------------------------------------------------------- /lib/src/widgets/cart_details.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:groceries/src/providers/cart_provider.dart'; 3 | import 'package:groceries/src/widgets/cart_item.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | class CartDetails extends StatelessWidget { 7 | double screenWidth, screenHeight; 8 | CartProvider _provider; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | Size size = MediaQuery.of(context).size; 13 | screenWidth = size.width; 14 | screenHeight = size.height; 15 | 16 | _provider = Provider.of(context); 17 | return Container( 18 | padding: EdgeInsets.all(20), 19 | 20 | width: screenWidth, 21 | child: Column( 22 | mainAxisAlignment: MainAxisAlignment.start, 23 | crossAxisAlignment: CrossAxisAlignment.start, 24 | children: [ 25 | Padding( 26 | padding: const EdgeInsets.only(left: 30, top: 40, bottom: 40), 27 | child: Text( 28 | 'Cart', 29 | style: TextStyle( 30 | color: Colors.white, 31 | fontWeight: FontWeight.bold, 32 | fontSize: 35), 33 | ), 34 | ), 35 | ..._provider.food.map((f) => CartItem(f)).toList(), 36 | Container( 37 | padding: EdgeInsets.symmetric(horizontal: 10), 38 | width: screenWidth, 39 | height: 60, 40 | child: Row( 41 | mainAxisSize: MainAxisSize.max, 42 | crossAxisAlignment: CrossAxisAlignment.center, 43 | children: [ 44 | CircleAvatar( 45 | radius: 22, 46 | backgroundColor: Colors.grey.withOpacity(0.5), 47 | child: Icon( 48 | Icons.location_on, 49 | color: Colors.amber[600], 50 | ), 51 | ), 52 | Expanded( 53 | child: Padding( 54 | padding: const EdgeInsets.only(left: 10), 55 | child: Text('Delivery', 56 | textAlign: TextAlign.start, 57 | maxLines: 2, 58 | overflow: TextOverflow.fade, 59 | style: TextStyle(color: Colors.white, fontSize: 16)), 60 | ), 61 | ), 62 | Text('\$30', 63 | style: TextStyle(color: Colors.white, fontSize: 16)), 64 | 65 | ], 66 | ), 67 | 68 | ), 69 | SizedBox(height: 50), 70 | Container( 71 | width: screenWidth, 72 | padding: EdgeInsets.only(left: 10,right: 15), 73 | child: Row( 74 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 75 | crossAxisAlignment: CrossAxisAlignment.center, 76 | mainAxisSize: MainAxisSize.max, 77 | children: [ 78 | Text('Total',style: TextStyle(color: Colors.grey.withOpacity(0.6),fontWeight: FontWeight.bold,fontSize: 25),), 79 | Text('\$${(_provider.getTotalPrice()+30).toStringAsFixed(2)}',style:TextStyle( 80 | color: Colors.white, 81 | fontWeight: FontWeight.bold, 82 | fontSize: 35)) 83 | ], 84 | ), 85 | ), 86 | SizedBox(height: 50), 87 | Center( 88 | child: MaterialButton( 89 | onPressed: () { 90 | 91 | }, 92 | color: Colors.amber[600], 93 | elevation: 0, 94 | child: Text( 95 | 'Next', 96 | style: 97 | TextStyle(color: Colors.black, fontWeight: FontWeight.bold), 98 | ), 99 | height: 50, 100 | minWidth: screenWidth - 100, 101 | shape: RoundedRectangleBorder( 102 | borderRadius: BorderRadius.circular(45)), 103 | ), 104 | ), 105 | SizedBox(height: 15), 106 | ], 107 | ), 108 | ); 109 | } 110 | 111 | 112 | } 113 | -------------------------------------------------------------------------------- /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.10" 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.3.0" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.5" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.2" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.14.11" 46 | convert: 47 | dependency: transitive 48 | description: 49 | name: convert 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.1.1" 53 | crypto: 54 | dependency: transitive 55 | description: 56 | name: crypto 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.3" 60 | cupertino_icons: 61 | dependency: "direct main" 62 | description: 63 | name: cupertino_icons 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "0.1.2" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_staggered_grid_view: 73 | dependency: "direct main" 74 | description: 75 | name: flutter_staggered_grid_view 76 | url: "https://pub.dartlang.org" 77 | source: hosted 78 | version: "0.3.0" 79 | flutter_test: 80 | dependency: "direct dev" 81 | description: flutter 82 | source: sdk 83 | version: "0.0.0" 84 | image: 85 | dependency: transitive 86 | description: 87 | name: image 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "2.1.4" 91 | matcher: 92 | dependency: transitive 93 | description: 94 | name: matcher 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "0.12.5" 98 | meta: 99 | dependency: transitive 100 | description: 101 | name: meta 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "1.1.7" 105 | path: 106 | dependency: transitive 107 | description: 108 | name: path 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.6.4" 112 | pedantic: 113 | dependency: transitive 114 | description: 115 | name: pedantic 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "1.8.0+1" 119 | petitparser: 120 | dependency: transitive 121 | description: 122 | name: petitparser 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "2.4.0" 126 | provider: 127 | dependency: "direct main" 128 | description: 129 | name: provider 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "3.1.0" 133 | quiver: 134 | dependency: transitive 135 | description: 136 | name: quiver 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "2.0.5" 140 | sky_engine: 141 | dependency: transitive 142 | description: flutter 143 | source: sdk 144 | version: "0.0.99" 145 | source_span: 146 | dependency: transitive 147 | description: 148 | name: source_span 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.5.5" 152 | stack_trace: 153 | dependency: transitive 154 | description: 155 | name: stack_trace 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.9.3" 159 | stream_channel: 160 | dependency: transitive 161 | description: 162 | name: stream_channel 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.0.0" 166 | string_scanner: 167 | dependency: transitive 168 | description: 169 | name: string_scanner 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.0.5" 173 | term_glyph: 174 | dependency: transitive 175 | description: 176 | name: term_glyph 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.1.0" 180 | test_api: 181 | dependency: transitive 182 | description: 183 | name: test_api 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.2.5" 187 | typed_data: 188 | dependency: transitive 189 | description: 190 | name: typed_data 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.1.6" 194 | vector_math: 195 | dependency: transitive 196 | description: 197 | name: vector_math 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "2.0.8" 201 | xml: 202 | dependency: transitive 203 | description: 204 | name: xml 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "3.5.0" 208 | sdks: 209 | dart: ">=2.4.0 <3.0.0" 210 | flutter: ">=1.6.0" 211 | -------------------------------------------------------------------------------- /lib/src/pages/product_details.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:groceries/src/models/food.dart'; 4 | import 'package:groceries/src/providers/cart_provider.dart'; 5 | import 'package:groceries/src/providers/food_provider.dart'; 6 | import 'package:provider/provider.dart'; 7 | 8 | class ProductDetails extends StatefulWidget { 9 | static final String routeName = '/details'; 10 | 11 | @override 12 | _ProductDetailsState createState() => _ProductDetailsState(); 13 | } 14 | 15 | class _ProductDetailsState extends State { 16 | Food _food; 17 | Map args; 18 | CartProvider _cartProvider; 19 | FoodProvider _foodProvider; 20 | double screenWidth, screenHeight; 21 | bool isFavorite = false; 22 | int amount = 1; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | Size size = MediaQuery.of(context).size; 27 | screenWidth = size.width; 28 | screenHeight = size.height; 29 | 30 | _cartProvider = Provider.of(context); 31 | _foodProvider = Provider.of(context); 32 | args = ModalRoute.of(context).settings.arguments; 33 | if (args.containsKey('id')) { 34 | _food = 35 | _foodProvider.food.firstWhere((Food food) => food.id == args['id']); 36 | } else { 37 | Navigator.of(context).pop(); 38 | } 39 | 40 | return Scaffold( 41 | body: Stack( 42 | children: [ 43 | Padding( 44 | padding: const EdgeInsets.only(top: 40, left: 16), 45 | child: Align( 46 | alignment: Alignment.topLeft, 47 | child: IconButton( 48 | icon: Icon(CupertinoIcons.back), 49 | onPressed: () { 50 | Navigator.of(context).pop(); 51 | }), 52 | ), 53 | ), 54 | buildBodyColumn(), 55 | Align( 56 | alignment: Alignment.bottomCenter, 57 | child: buildActionsContainer(), 58 | ) 59 | ], 60 | ), 61 | ); 62 | } 63 | 64 | Widget buildBodyColumn() { 65 | return SingleChildScrollView( 66 | child: Column( 67 | crossAxisAlignment: CrossAxisAlignment.start, 68 | children: [ 69 | SizedBox( 70 | width: screenWidth, 71 | height: 70, 72 | ), 73 | Padding( 74 | padding: EdgeInsets.only(left: screenWidth * 0.25), 75 | child: Hero( 76 | tag: '${_food.id}', 77 | child: Image.asset( 78 | _food.image, 79 | height: 200, 80 | width: screenWidth * 0.5, 81 | fit: BoxFit.cover, 82 | ), 83 | ), 84 | ), 85 | Container( 86 | padding: EdgeInsets.symmetric(vertical: 20, horizontal: 30), 87 | child: Text( 88 | _food.description, 89 | overflow: TextOverflow.ellipsis, 90 | maxLines: 2, 91 | style: TextStyle( 92 | color: Colors.black, 93 | fontWeight: FontWeight.bold, 94 | fontSize: 26), 95 | ), 96 | width: screenWidth * 0.9, 97 | ), 98 | Padding( 99 | padding: const EdgeInsets.only(left: 30), 100 | child: Text( 101 | '${_food.weight}g', 102 | style: TextStyle(color: Colors.grey, fontWeight: FontWeight.bold), 103 | ), 104 | ), 105 | Container( 106 | padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 30), 107 | child: Row( 108 | mainAxisSize: MainAxisSize.max, 109 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 110 | children: [ 111 | buildAmountButton(), 112 | Text( 113 | '\$${(amount * _food.price).toStringAsFixed(2)}', 114 | style: TextStyle( 115 | color: Colors.black, 116 | fontWeight: FontWeight.bold, 117 | fontSize: 26), 118 | ) 119 | ], 120 | ), 121 | ), 122 | Padding( 123 | padding: const EdgeInsets.only(left: 30, top: 10), 124 | child: Text( 125 | 'About the product', 126 | style: TextStyle( 127 | color: Colors.black, 128 | fontWeight: FontWeight.bold, 129 | fontSize: 16), 130 | ), 131 | ), 132 | Padding( 133 | padding: const EdgeInsets.symmetric(horizontal: 30), 134 | child: Text( 135 | text, 136 | maxLines: 3, 137 | overflow: TextOverflow.fade, 138 | style: TextStyle(fontSize: 18), 139 | ), 140 | ), 141 | SizedBox(height: 75) 142 | ], 143 | ), 144 | ); 145 | } 146 | 147 | Widget buildAmountButton() { 148 | return Container( 149 | width: 100, 150 | height: 35, 151 | decoration: BoxDecoration( 152 | borderRadius: BorderRadius.circular(45), 153 | border: Border.all(color: Colors.grey, width: 1)), 154 | child: Row( 155 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 156 | crossAxisAlignment: CrossAxisAlignment.center, 157 | children: [ 158 | GestureDetector( 159 | child: Icon(Icons.remove), 160 | onTap: () { 161 | setState(() { 162 | if (amount > 1) --amount; 163 | }); 164 | }, 165 | onLongPressStart: (_) { 166 | setState(() { 167 | amount = 1; 168 | }); 169 | }, 170 | ), 171 | Text('$amount'), 172 | GestureDetector( 173 | child: Icon(Icons.add), 174 | onTap: () { 175 | setState(() { 176 | if (amount < 25) ++amount; 177 | }); 178 | }, 179 | onLongPressStart: (_) { 180 | setState(() { 181 | amount = 25; 182 | }); 183 | }, 184 | ), 185 | ], 186 | ), 187 | ); 188 | } 189 | 190 | Widget buildActionsContainer() { 191 | return Container( 192 | color: Color(0xfffafafa), 193 | width: screenWidth, 194 | height: 80, 195 | child: Center( 196 | child: Row( 197 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 198 | crossAxisAlignment: CrossAxisAlignment.center, 199 | children: [ 200 | Container( 201 | width: 50, 202 | height: 50, 203 | decoration: BoxDecoration( 204 | shape: BoxShape.circle, 205 | border: Border.all(color: Colors.grey, width: 1)), 206 | child: Center( 207 | child: IconButton( 208 | icon: Icon( 209 | isFavorite ? Icons.favorite : Icons.favorite_border, 210 | color: isFavorite ? Colors.red : Colors.black, 211 | ), 212 | onPressed: () { 213 | setState(() { 214 | isFavorite = !isFavorite; 215 | }); 216 | })), 217 | ), 218 | MaterialButton( 219 | onPressed: () { 220 | _cartProvider.addFood(_food); 221 | _foodProvider.food[args['id']].amount = amount; 222 | Navigator.of(context).pop(); 223 | }, 224 | color: Colors.amber[600], 225 | elevation: 0, 226 | child: Text( 227 | 'Add to cart', 228 | style: 229 | TextStyle(color: Colors.black, fontWeight: FontWeight.bold), 230 | ), 231 | height: 50, 232 | minWidth: screenWidth - 150, 233 | shape: RoundedRectangleBorder( 234 | borderRadius: BorderRadius.circular(45)), 235 | ) 236 | ], 237 | ), 238 | ), 239 | ); 240 | } 241 | } 242 | 243 | final String text = 244 | 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book'; 245 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXCopyFilesBuildPhase section */ 23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 24 | isa = PBXCopyFilesBuildPhase; 25 | buildActionMask = 2147483647; 26 | dstPath = ""; 27 | dstSubfolderSpec = 10; 28 | files = ( 29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 31 | ); 32 | name = "Embed Frameworks"; 33 | runOnlyForDeploymentPostprocessing = 0; 34 | }; 35 | /* End PBXCopyFilesBuildPhase section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 9740EEB11CF90186004384FC /* Flutter */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 3B80C3931E831B6300D905FE /* App.framework */, 72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 77 | ); 78 | name = Flutter; 79 | sourceTree = ""; 80 | }; 81 | 97C146E51CF9000F007C117D = { 82 | isa = PBXGroup; 83 | children = ( 84 | 9740EEB11CF90186004384FC /* Flutter */, 85 | 97C146F01CF9000F007C117D /* Runner */, 86 | 97C146EF1CF9000F007C117D /* Products */, 87 | ); 88 | sourceTree = ""; 89 | }; 90 | 97C146EF1CF9000F007C117D /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 97C146EE1CF9000F007C117D /* Runner.app */, 94 | ); 95 | name = Products; 96 | sourceTree = ""; 97 | }; 98 | 97C146F01CF9000F007C117D /* Runner */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 104 | 97C147021CF9000F007C117D /* Info.plist */, 105 | 97C146F11CF9000F007C117D /* Supporting Files */, 106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 110 | ); 111 | path = Runner; 112 | sourceTree = ""; 113 | }; 114 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | 97C146ED1CF9000F007C117D /* Runner */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 127 | buildPhases = ( 128 | 9740EEB61CF901F6004384FC /* Run Script */, 129 | 97C146EA1CF9000F007C117D /* Sources */, 130 | 97C146EB1CF9000F007C117D /* Frameworks */, 131 | 97C146EC1CF9000F007C117D /* Resources */, 132 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 134 | ); 135 | buildRules = ( 136 | ); 137 | dependencies = ( 138 | ); 139 | name = Runner; 140 | productName = Runner; 141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 142 | productType = "com.apple.product-type.application"; 143 | }; 144 | /* End PBXNativeTarget section */ 145 | 146 | /* Begin PBXProject section */ 147 | 97C146E61CF9000F007C117D /* Project object */ = { 148 | isa = PBXProject; 149 | attributes = { 150 | LastUpgradeCheck = 1020; 151 | ORGANIZATIONNAME = "The Chromium Authors"; 152 | TargetAttributes = { 153 | 97C146ED1CF9000F007C117D = { 154 | CreatedOnToolsVersion = 7.3.1; 155 | LastSwiftMigration = 0910; 156 | }; 157 | }; 158 | }; 159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 160 | compatibilityVersion = "Xcode 3.2"; 161 | developmentRegion = en; 162 | hasScannedForEncodings = 0; 163 | knownRegions = ( 164 | en, 165 | Base, 166 | ); 167 | mainGroup = 97C146E51CF9000F007C117D; 168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 169 | projectDirPath = ""; 170 | projectRoot = ""; 171 | targets = ( 172 | 97C146ED1CF9000F007C117D /* Runner */, 173 | ); 174 | }; 175 | /* End PBXProject section */ 176 | 177 | /* Begin PBXResourcesBuildPhase section */ 178 | 97C146EC1CF9000F007C117D /* Resources */ = { 179 | isa = PBXResourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXResourcesBuildPhase section */ 190 | 191 | /* Begin PBXShellScriptBuildPhase section */ 192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | ); 199 | name = "Thin Binary"; 200 | outputPaths = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | shellPath = /bin/sh; 204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 205 | }; 206 | 9740EEB61CF901F6004384FC /* Run Script */ = { 207 | isa = PBXShellScriptBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | inputPaths = ( 212 | ); 213 | name = "Run Script"; 214 | outputPaths = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | shellPath = /bin/sh; 218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 219 | }; 220 | /* End PBXShellScriptBuildPhase section */ 221 | 222 | /* Begin PBXSourcesBuildPhase section */ 223 | 97C146EA1CF9000F007C117D /* Sources */ = { 224 | isa = PBXSourcesBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | }; 232 | /* End PBXSourcesBuildPhase section */ 233 | 234 | /* Begin PBXVariantGroup section */ 235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 236 | isa = PBXVariantGroup; 237 | children = ( 238 | 97C146FB1CF9000F007C117D /* Base */, 239 | ); 240 | name = Main.storyboard; 241 | sourceTree = ""; 242 | }; 243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 244 | isa = PBXVariantGroup; 245 | children = ( 246 | 97C147001CF9000F007C117D /* Base */, 247 | ); 248 | name = LaunchScreen.storyboard; 249 | sourceTree = ""; 250 | }; 251 | /* End PBXVariantGroup section */ 252 | 253 | /* Begin XCBuildConfiguration section */ 254 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 255 | isa = XCBuildConfiguration; 256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 257 | buildSettings = { 258 | ALWAYS_SEARCH_USER_PATHS = NO; 259 | CLANG_ANALYZER_NONNULL = YES; 260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 261 | CLANG_CXX_LIBRARY = "libc++"; 262 | CLANG_ENABLE_MODULES = YES; 263 | CLANG_ENABLE_OBJC_ARC = YES; 264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 265 | CLANG_WARN_BOOL_CONVERSION = YES; 266 | CLANG_WARN_COMMA = YES; 267 | CLANG_WARN_CONSTANT_CONVERSION = YES; 268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 270 | CLANG_WARN_EMPTY_BODY = YES; 271 | CLANG_WARN_ENUM_CONVERSION = YES; 272 | CLANG_WARN_INFINITE_RECURSION = YES; 273 | CLANG_WARN_INT_CONVERSION = YES; 274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNREACHABLE_CODE = YES; 282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_NS_ASSERTIONS = NO; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | GCC_C_LANGUAGE_STANDARD = gnu99; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 297 | MTL_ENABLE_DEBUG_INFO = NO; 298 | SDKROOT = iphoneos; 299 | SUPPORTED_PLATFORMS = iphoneos; 300 | TARGETED_DEVICE_FAMILY = "1,2"; 301 | VALIDATE_PRODUCT = YES; 302 | }; 303 | name = Profile; 304 | }; 305 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 306 | isa = XCBuildConfiguration; 307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 308 | buildSettings = { 309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 310 | CLANG_ENABLE_MODULES = YES; 311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 312 | ENABLE_BITCODE = NO; 313 | FRAMEWORK_SEARCH_PATHS = ( 314 | "$(inherited)", 315 | "$(PROJECT_DIR)/Flutter", 316 | ); 317 | INFOPLIST_FILE = Runner/Info.plist; 318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 319 | LIBRARY_SEARCH_PATHS = ( 320 | "$(inherited)", 321 | "$(PROJECT_DIR)/Flutter", 322 | ); 323 | PRODUCT_BUNDLE_IDENTIFIER = com.example.groceries; 324 | PRODUCT_NAME = "$(TARGET_NAME)"; 325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 326 | SWIFT_VERSION = 4.0; 327 | VERSIONING_SYSTEM = "apple-generic"; 328 | }; 329 | name = Profile; 330 | }; 331 | 97C147031CF9000F007C117D /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 356 | CLANG_WARN_STRICT_PROTOTYPES = YES; 357 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 358 | CLANG_WARN_UNREACHABLE_CODE = YES; 359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 361 | COPY_PHASE_STRIP = NO; 362 | DEBUG_INFORMATION_FORMAT = dwarf; 363 | ENABLE_STRICT_OBJC_MSGSEND = YES; 364 | ENABLE_TESTABILITY = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu99; 366 | GCC_DYNAMIC_NO_PIC = NO; 367 | GCC_NO_COMMON_BLOCKS = YES; 368 | GCC_OPTIMIZATION_LEVEL = 0; 369 | GCC_PREPROCESSOR_DEFINITIONS = ( 370 | "DEBUG=1", 371 | "$(inherited)", 372 | ); 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 380 | MTL_ENABLE_DEBUG_INFO = YES; 381 | ONLY_ACTIVE_ARCH = YES; 382 | SDKROOT = iphoneos; 383 | TARGETED_DEVICE_FAMILY = "1,2"; 384 | }; 385 | name = Debug; 386 | }; 387 | 97C147041CF9000F007C117D /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 390 | buildSettings = { 391 | ALWAYS_SEARCH_USER_PATHS = NO; 392 | CLANG_ANALYZER_NONNULL = YES; 393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 394 | CLANG_CXX_LIBRARY = "libc++"; 395 | CLANG_ENABLE_MODULES = YES; 396 | CLANG_ENABLE_OBJC_ARC = YES; 397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 398 | CLANG_WARN_BOOL_CONVERSION = YES; 399 | CLANG_WARN_COMMA = YES; 400 | CLANG_WARN_CONSTANT_CONVERSION = YES; 401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 403 | CLANG_WARN_EMPTY_BODY = YES; 404 | CLANG_WARN_ENUM_CONVERSION = YES; 405 | CLANG_WARN_INFINITE_RECURSION = YES; 406 | CLANG_WARN_INT_CONVERSION = YES; 407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 412 | CLANG_WARN_STRICT_PROTOTYPES = YES; 413 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 414 | CLANG_WARN_UNREACHABLE_CODE = YES; 415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 417 | COPY_PHASE_STRIP = NO; 418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 419 | ENABLE_NS_ASSERTIONS = NO; 420 | ENABLE_STRICT_OBJC_MSGSEND = YES; 421 | GCC_C_LANGUAGE_STANDARD = gnu99; 422 | GCC_NO_COMMON_BLOCKS = YES; 423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 425 | GCC_WARN_UNDECLARED_SELECTOR = YES; 426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 427 | GCC_WARN_UNUSED_FUNCTION = YES; 428 | GCC_WARN_UNUSED_VARIABLE = YES; 429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 430 | MTL_ENABLE_DEBUG_INFO = NO; 431 | SDKROOT = iphoneos; 432 | SUPPORTED_PLATFORMS = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.groceries; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_VERSION = 4.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | ENABLE_BITCODE = NO; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | INFOPLIST_FILE = Runner/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 480 | LIBRARY_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/Flutter", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.groceries; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 487 | SWIFT_VERSION = 4.0; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 97C147031CF9000F007C117D /* Debug */, 499 | 97C147041CF9000F007C117D /* Release */, 500 | 249021D3217E4FDB00AE95B9 /* Profile */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 97C147061CF9000F007C117D /* Debug */, 509 | 97C147071CF9000F007C117D /* Release */, 510 | 249021D4217E4FDB00AE95B9 /* Profile */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | /* End XCConfigurationList section */ 516 | 517 | }; 518 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 519 | } 520 | --------------------------------------------------------------------------------