├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── nutrition │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── 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-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── fonts │ └── muli │ │ ├── Muli-Bold.ttf │ │ ├── Muli-Light.ttf │ │ └── Muli.ttf ├── icons │ ├── bookmark.svg │ ├── calendar.svg │ ├── chicken.svg │ ├── croissant.svg │ ├── document.svg │ ├── home.svg │ ├── notification.svg │ ├── pasta.svg │ ├── play-circle.svg │ ├── salad.svg │ ├── search.svg │ ├── setting.svg │ ├── shopping-cart.svg │ ├── tea.svg │ └── user.svg └── images │ └── pasta.jpg ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── 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-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── config │ ├── config.dart │ ├── routes │ │ └── routes.dart │ └── theme │ │ └── theme.dart ├── main.dart ├── model │ ├── food-consumed.dart │ ├── meal-consumed.dart │ └── model.dart ├── screen │ ├── add-food │ │ ├── add-food-body.dart │ │ ├── add-food.dart │ │ └── widget │ │ │ ├── appbar.dart │ │ │ ├── calorie-statistics.dart │ │ │ ├── change-amount.dart │ │ │ └── food-image.dart │ ├── daily-summary-detail │ │ ├── daily-summary-detail-body.dart │ │ ├── daily-summary-detail.dart │ │ └── widget │ │ │ ├── appbar.dart │ │ │ ├── date.dart │ │ │ ├── meals-consumed.dart │ │ │ └── remaining-calorie.dart │ ├── home │ │ ├── home-body.dart │ │ ├── home.dart │ │ └── widget │ │ │ ├── appbar.dart │ │ │ ├── daily-calorie-statistics.dart │ │ │ ├── daily-summary.dart │ │ │ └── meal-consumed.dart │ ├── nav │ │ └── nav.dart │ └── screen.dart └── widget │ ├── meal-consumed-tile.dart │ ├── statistics-tile.dart │ └── widget.dart ├── pubspec.lock ├── pubspec.yaml ├── screenshot.jpg ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png ├── Icon-512.png ├── Icon-maskable-192.png └── Icon-maskable-512.png ├── index.html └── manifest.json /.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 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /.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: 18116933e77adc82f80866c928266a5b4f1ed645 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Nutrition UI 2 | 3 | 4 | 5 | 6 | ## Screenshot 7 | 8 | ![App Screenshot](https://github.com/mahdinazmi/Flutter-Nutrition-UI/blob/main/screenshot.jpg) 9 | 10 | 11 | ## Design By 12 | 13 | - [Piqodesign](https://dribbble.com/Piqodesign) 14 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | prefer_const_constructors: false 26 | file_names: false 27 | avoid_print: false # Uncomment to disable the `avoid_print` rule 28 | prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 29 | 30 | # Additional information about this file can be found at 31 | # https://dart.dev/guides/language/analysis-options 32 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /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 30 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.nutrition" 47 | minSdkVersion 16 48 | targetSdkVersion 30 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/nutrition/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.nutrition 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /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-6.7-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/fonts/muli/Muli-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/assets/fonts/muli/Muli-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/muli/Muli-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/assets/fonts/muli/Muli-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/muli/Muli.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/assets/fonts/muli/Muli.ttf -------------------------------------------------------------------------------- /assets/icons/bookmark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/icons/calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/icons/chicken.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 12 | 15 | 24 | 28 | 31 | 34 | 37 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /assets/icons/croissant.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 15 | 20 | 21 | 26 | 30 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /assets/icons/document.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/icons/home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 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 | 39 | 40 | -------------------------------------------------------------------------------- /assets/icons/notification.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/icons/pasta.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 18 | 19 | 20 | 23 | 26 | 28 | 29 | 30 | 33 | 36 | 39 | 40 | 41 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /assets/icons/play-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/salad.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/icons/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/icons/setting.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /assets/icons/shopping-cart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/tea.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/icons/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/pasta.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/assets/images/pasta.jpg -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /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 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1020; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.nutrition; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.nutrition; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.nutrition; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/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/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/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 | nutrition 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 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/config/config.dart: -------------------------------------------------------------------------------- 1 | export 'routes/routes.dart'; 2 | export 'theme/theme.dart'; -------------------------------------------------------------------------------- /lib/config/routes/routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | import 'package:nutrition/screen/screen.dart'; 3 | 4 | // We use name route 5 | // All our routes will be available here 6 | final Map routes = { 7 | HomeScreen.routeName: (context) => HomeScreen(), 8 | Nav.routeName : (context) => Nav(), 9 | DailySummaryDetailScreen.routeName : (context) => DailySummaryDetailScreen(), 10 | AddFoodScreen.routeName : (context) => AddFoodScreen() 11 | }; 12 | -------------------------------------------------------------------------------- /lib/config/theme/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AppColors { 4 | static const Color colorPrimary = Color.fromRGBO(83, 95, 247, 1); 5 | static const Color colorPrimaryLight = Color.fromRGBO(229, 231, 254, 1); 6 | static const Color colorPrimaryDark = Color.fromRGBO(12, 16, 69, 1); 7 | static const Color colorSecondary = Color.fromRGBO(246, 86, 22, 1); 8 | static const Color colorSecondaryLight = Color.fromRGBO(254, 230, 220, 1); 9 | static const Color colorSecondaryDark = Color.fromRGBO(50, 22, 11, 1); 10 | static const Color colorAccent = Color.fromRGBO(57, 149, 119, 1); 11 | static const Color colorAccentLight = Color.fromRGBO(225, 239, 235, 1); 12 | static const Color colorAccentDark = Color.fromRGBO(14, 78, 57, 1); 13 | static const Color colorTint900 = Color.fromRGBO(27, 32, 43, 1); 14 | static const Color colorTint800 = Color.fromRGBO(47, 55, 71, 1); 15 | static const Color colorTint700 = Color.fromRGBO(76, 85, 102, 1); 16 | static const Color colorTint600 = Color.fromRGBO(116, 128, 148, 1); 17 | static const Color colorTint500 = Color.fromRGBO(163, 174, 190, 1); 18 | static const Color colorTint400 = Color.fromRGBO(205, 213, 223, 1); 19 | static const Color colorTint300 = Color.fromRGBO(227, 232, 239, 1); 20 | static const Color colorTint200 = Color.fromRGBO(238, 242, 247, 1); 21 | static const Color colorTint100 = Color.fromRGBO(248, 250, 252, 1); 22 | static const Color colorWarning = Color.fromRGBO(255, 182, 48, 1); 23 | static const Color colorYellowWarning = Color(0xffFFE600); 24 | static const Color colorWarningLight = Color.fromRGBO(255, 244, 224, 1); 25 | static const Color colorWarningDark = Color.fromRGBO(82, 56, 10, 1); 26 | static const Color colorError = Color.fromRGBO(239, 80, 80, 1); 27 | static const Color colorErrorLight = Color.fromRGBO(253, 229, 229, 1); 28 | static const Color colorErrorDark = Color.fromRGBO(58, 7, 7, 1); 29 | static const Color colorWhite = Color.fromRGBO(255, 255, 255, 1); 30 | static const Color toolbarColor = Color.fromRGBO(27, 32, 43, 1); 31 | static const Color colorBlack = Color.fromRGBO(0, 0, 0, 1); 32 | static const Color colorBlackTransparent = Color.fromRGBO(0, 0, 0, .6); 33 | static const Color colorBlackTransparent1 = Color.fromRGBO(0, 0, 0, .2); 34 | static const Color colorBlueLight = Color.fromRGBO(92, 206, 255, 0.14); 35 | static const Color colorBlue = Color.fromRGBO(66, 133, 244, .8); 36 | static const Color colorTip = Color.fromRGBO(80, 80, 244, .8); 37 | static const Color colorBackColor = Color.fromRGBO(229, 229, 229, 1); 38 | } 39 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:nutrition/screen/screen.dart'; 4 | 5 | import 'config/routes/routes.dart'; 6 | 7 | void main() { 8 | runApp(const MyApp()); 9 | } 10 | 11 | class MyApp extends StatelessWidget { 12 | const MyApp({ Key ? key }): super(key: key); 13 | // This widget is the root of your application. 14 | @override 15 | Widget build(BuildContext context) { 16 | return ScreenUtilInit( 17 | designSize: Size(375, 812), 18 | minTextAdapt: true, 19 | splitScreenMode: true, 20 | builder: (c) { 21 | return MaterialApp( 22 | theme: ThemeData( 23 | primarySwatch: Colors.blue, 24 | ), 25 | debugShowCheckedModeBanner: false, 26 | initialRoute: Nav.routeName, 27 | routes: routes, 28 | ); 29 | } 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/model/food-consumed.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | class FoodConsumed { 3 | final String ? foodName; 4 | final String ? consumedAmount; 5 | final Widget ? icon; 6 | final Color ? boxColor; 7 | FoodConsumed({this.foodName, this.consumedAmount, this.icon, this.boxColor}); 8 | } -------------------------------------------------------------------------------- /lib/model/meal-consumed.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:nutrition/model/food-consumed.dart'; 3 | class MealConsumed { 4 | final List ? consumedFoods; 5 | final String ? mealName; 6 | final String ? mealAmount; 7 | final double ? progressValue; 8 | MealConsumed({this.consumedFoods,this.mealName,this.mealAmount,this.progressValue}); 9 | } -------------------------------------------------------------------------------- /lib/model/model.dart: -------------------------------------------------------------------------------- 1 | export 'food-consumed.dart'; 2 | export 'meal-consumed.dart'; -------------------------------------------------------------------------------- /lib/screen/add-food/add-food-body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'widget/appbar.dart'; 4 | import 'widget/calorie-statistics.dart'; 5 | import 'widget/change-amount.dart'; 6 | import 'widget/food-image.dart'; 7 | 8 | class AddFoodBody extends StatelessWidget { 9 | 10 | const AddFoodBody({ 11 | Key ? key 12 | }): super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | backgroundColor: Colors.white, 18 | body: Container( 19 | margin: EdgeInsets.only(right: 15. w, left: 15. w), 20 | child: ListView( 21 | physics: BouncingScrollPhysics(), 22 | children: const [ 23 | AddFoodScreenAppBar(), 24 | FoodImage(), 25 | CalorieStatistics(), 26 | ChangeAmount() 27 | ], 28 | ), 29 | ), 30 | ); 31 | } 32 | } -------------------------------------------------------------------------------- /lib/screen/add-food/add-food.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'add-food-body.dart'; 4 | 5 | class AddFoodScreen extends StatelessWidget { 6 | 7 | static String routeName = '/addfood'; 8 | const AddFoodScreen({ Key? key }) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return AddFoodBody(); 13 | } 14 | } -------------------------------------------------------------------------------- /lib/screen/add-food/widget/appbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:nutrition/config/config.dart'; 5 | 6 | class AddFoodScreenAppBar extends StatelessWidget { 7 | const AddFoodScreenAppBar({ 8 | Key ? key 9 | }): super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Row( 14 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 15 | crossAxisAlignment: CrossAxisAlignment.center, 16 | children: [ 17 | InkWell( 18 | onTap: () { 19 | Navigator.pop(context); 20 | }, 21 | child: Container( 22 | height: 100. w, 23 | color: Colors.transparent, 24 | child: Row( 25 | children: [ 26 | Container( 27 | height: 50. w, 28 | width: 50. w, 29 | decoration: BoxDecoration( 30 | color: AppColors.colorTint200, 31 | borderRadius: BorderRadius.circular(15) 32 | ), 33 | child: Center( 34 | child: Icon( 35 | Icons.arrow_back, 36 | color: AppColors.colorPrimary, 37 | size: 25. sp, 38 | ) 39 | ) 40 | ), 41 | ], 42 | ), 43 | ), 44 | ), 45 | Text( 46 | 'Add new food', 47 | style: TextStyle( 48 | color: Colors.black, 49 | fontSize: 18. sp, 50 | fontWeight: FontWeight.bold 51 | ), 52 | ), 53 | InkWell( 54 | onTap: () { 55 | Navigator.pop(context); 56 | }, 57 | child: Container( 58 | height: 100. w, 59 | color: Colors.transparent, 60 | child: Row( 61 | children: [ 62 | Container( 63 | height: 50. w, 64 | width: 50. w, 65 | decoration: BoxDecoration( 66 | color: AppColors.colorTint200, 67 | borderRadius: BorderRadius.circular(15) 68 | ), 69 | child: Center( 70 | child: FaIcon( 71 | FontAwesomeIcons.barcode, 72 | size: 20. sp, 73 | color: AppColors.colorPrimary, 74 | ), 75 | ) 76 | ), 77 | ], 78 | ), 79 | ), 80 | ), 81 | ], 82 | ); 83 | } 84 | } -------------------------------------------------------------------------------- /lib/screen/add-food/widget/calorie-statistics.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:nutrition/config/config.dart'; 5 | import 'package:nutrition/widget/widget.dart'; 6 | import 'package:percent_indicator/linear_percent_indicator.dart'; 7 | 8 | class CalorieStatistics extends StatelessWidget { 9 | const CalorieStatistics({ 10 | Key ? key 11 | }): super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Column( 16 | children: [ 17 | AspectRatio( 18 | aspectRatio: 2, 19 | child: Container( 20 | margin: EdgeInsets.only(top: 18. w), 21 | child: Row( 22 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 23 | children: [ 24 | _calorieStatistics(), 25 | SizedBox(width: 15. w, ), 26 | statisticsTile( 27 | title: 'Carbs', 28 | icon: FaIcon( 29 | FontAwesomeIcons.pizzaSlice, 30 | color: Colors.amber, 31 | ), 32 | progressColor: Colors.amber, 33 | unitName: 'grams', 34 | value: 23.50, 35 | progressPercent: 0.7 36 | ), 37 | ], 38 | ), 39 | ), 40 | ), 41 | AspectRatio( 42 | aspectRatio: 2, 43 | child: Container( 44 | margin: EdgeInsets.only(top: 18. w), 45 | child: Row( 46 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 47 | children: [ 48 | statisticsTile( 49 | title: 'Proteins', 50 | icon: FaIcon( 51 | FontAwesomeIcons.pizzaSlice, 52 | color: Colors.blue, 53 | ), 54 | progressColor: Colors.blue, 55 | unitName: 'grams', 56 | value: 6.0, 57 | progressPercent: 0.4 58 | ), 59 | SizedBox(width: 15. w, ), 60 | statisticsTile( 61 | title: 'Fats', 62 | icon: FaIcon( 63 | FontAwesomeIcons.fire, 64 | color: Colors.red, 65 | ), 66 | progressColor: Colors.red, 67 | unitName: 'grams', 68 | value: 4.1, 69 | progressPercent: 0.2 70 | ), 71 | ], 72 | ), 73 | ), 74 | ), 75 | ], 76 | ); 77 | } 78 | 79 | Widget _calorieStatistics() { 80 | return Expanded( 81 | child: Container( 82 | padding: EdgeInsets.all(20), 83 | decoration: BoxDecoration( 84 | color: AppColors.colorPrimary, 85 | borderRadius: BorderRadius.circular(25) 86 | ), 87 | child: Column( 88 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 89 | crossAxisAlignment: CrossAxisAlignment.start, 90 | children: [ 91 | Row( 92 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 93 | children: [ 94 | Text( 95 | 'Calories', 96 | style: TextStyle( 97 | color: Colors.white, 98 | fontWeight: FontWeight.bold, 99 | fontSize: 18. sp 100 | ), 101 | ), 102 | FaIcon( 103 | FontAwesomeIcons.fire, 104 | color: Colors.orange, 105 | ), 106 | ], 107 | ), 108 | Row( 109 | children: [ 110 | RotatedBox( 111 | quarterTurns: -1, 112 | child: LinearPercentIndicator( 113 | width: 60. w, 114 | animation: true, 115 | lineHeight: 6, 116 | animationDuration: 2500, 117 | percent: 0.6, 118 | barRadius: Radius.circular(3), 119 | progressColor: Colors.white, 120 | padding: EdgeInsets.zero, 121 | backgroundColor: AppColors.colorTint400.withOpacity(0.4), 122 | ), 123 | ), 124 | SizedBox(width: 20. w), 125 | Column( 126 | crossAxisAlignment: CrossAxisAlignment.start, 127 | children: [ 128 | Text( 129 | '149', 130 | style: TextStyle( 131 | color: Colors.white, 132 | fontSize: 20. sp, 133 | fontWeight: FontWeight.bold 134 | ), 135 | ), 136 | SizedBox(height: 5. w), 137 | Text( 138 | 'kcal', 139 | style: TextStyle( 140 | color: Colors.white, 141 | fontSize: 12. sp, 142 | ), 143 | ), 144 | ], 145 | ) 146 | ], 147 | ), 148 | ], 149 | ), 150 | ), 151 | ); 152 | } 153 | } -------------------------------------------------------------------------------- /lib/screen/add-food/widget/change-amount.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:nutrition/config/config.dart'; 4 | 5 | class ChangeAmount extends StatefulWidget { 6 | const ChangeAmount({ 7 | Key ? key 8 | }): super(key: key); 9 | 10 | @override 11 | State < ChangeAmount > createState() => _ChangeAmountState(); 12 | } 13 | 14 | class _ChangeAmountState extends State < ChangeAmount > { 15 | 16 | int amount = 160; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Container( 21 | height: 55. w, 22 | margin: EdgeInsets.only(top: 30. w, left: 20. w, right: 20. w), 23 | child: Row( 24 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 25 | children: [ 26 | Container( 27 | height: 55. w, 28 | width: 140. w, 29 | padding: EdgeInsets.all(7), 30 | decoration: BoxDecoration( 31 | color: AppColors.colorTint200, 32 | borderRadius: BorderRadius.circular(20) 33 | ), 34 | child: Row( 35 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 36 | children: [ 37 | InkWell( 38 | onTap: () { 39 | setState(() { 40 | amount--; 41 | }); 42 | }, 43 | child: Container( 44 | width: 35. w, 45 | decoration: BoxDecoration( 46 | color: Colors.white, 47 | borderRadius: BorderRadius.circular(10) 48 | ), 49 | child: Column( 50 | children: [ 51 | Icon( 52 | Icons.minimize, 53 | color: Colors.black, 54 | size: 25. sp, 55 | ), 56 | ], 57 | ), 58 | ), 59 | ), 60 | Text( 61 | amount.toString() + 'g', 62 | style: TextStyle( 63 | color: Colors.black, 64 | fontWeight: FontWeight.bold, 65 | fontSize: 14. sp, 66 | ), 67 | ), 68 | InkWell( 69 | onTap: () { 70 | setState(() { 71 | amount++; 72 | }); 73 | }, 74 | child: Container( 75 | width: 35. w, 76 | decoration: BoxDecoration( 77 | color: Colors.white, 78 | borderRadius: BorderRadius.circular(10) 79 | ), 80 | child: Column( 81 | mainAxisAlignment: MainAxisAlignment.center, 82 | children: [ 83 | Icon( 84 | Icons.add, 85 | color: Colors.black, 86 | size: 20. sp, 87 | ), 88 | ], 89 | ), 90 | ), 91 | ), 92 | ], 93 | ), 94 | ), 95 | Container( 96 | height: 55. w, 97 | width: 140. w, 98 | padding: EdgeInsets.all(7), 99 | decoration: BoxDecoration( 100 | color: AppColors.colorPrimary, 101 | borderRadius: BorderRadius.circular(20) 102 | ), 103 | child: Center( 104 | child: Text( 105 | 'Apply', 106 | style: TextStyle( 107 | color: Colors.white, 108 | fontSize: 18.sp 109 | ), 110 | ), 111 | ), 112 | ) 113 | ], 114 | ), 115 | ); 116 | } 117 | } -------------------------------------------------------------------------------- /lib/screen/add-food/widget/food-image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | 4 | class FoodImage extends StatelessWidget { 5 | const FoodImage({ 6 | Key ? key 7 | }): super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | height: 230. w, 13 | margin: EdgeInsets.only(top: 20. w), 14 | decoration: BoxDecoration( 15 | borderRadius: BorderRadius.circular(25), 16 | ), 17 | child: Stack( 18 | children: [ 19 | ClipRRect( 20 | borderRadius: BorderRadius.circular(25), 21 | child: Image.asset('assets/images/pasta.jpg', fit: BoxFit.cover, height: 230. w, width: double.infinity, ) 22 | ), 23 | Align( 24 | alignment: Alignment.bottomLeft, 25 | child: Container( 26 | margin: EdgeInsets.only(left: 15. w, bottom: 20. w, ), 27 | child: Text( 28 | 'Pasta with tomato sauce', 29 | style: TextStyle( 30 | color: Colors.white, 31 | fontSize: 22. sp 32 | ), 33 | ) 34 | ), 35 | ) 36 | ], 37 | ), 38 | ); 39 | } 40 | } -------------------------------------------------------------------------------- /lib/screen/daily-summary-detail/daily-summary-detail-body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:nutrition/config/config.dart'; 4 | import 'widget/appbar.dart'; 5 | import 'widget/date.dart'; 6 | import 'widget/meals-consumed.dart'; 7 | import 'widget/remaining-calorie.dart'; 8 | 9 | class DailySummaryDetailBody extends StatefulWidget { 10 | const DailySummaryDetailBody({ 11 | Key ? key 12 | }): super(key: key); 13 | 14 | @override 15 | State < DailySummaryDetailBody > createState() => _DailySummaryDetailBodyState(); 16 | } 17 | 18 | class _DailySummaryDetailBodyState extends State < DailySummaryDetailBody > { 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | backgroundColor: Colors.white, 23 | body: Container( 24 | margin: EdgeInsets.only(right: 15. w, left: 15. w), 25 | child: ListView( 26 | physics: BouncingScrollPhysics(), 27 | children: const [ 28 | DailySummaryDetailScreenAppBar(), 29 | Date(), 30 | MealsConsumed(), 31 | RemainingCalorie(), 32 | ], 33 | ), 34 | ), 35 | ); 36 | } 37 | } -------------------------------------------------------------------------------- /lib/screen/daily-summary-detail/daily-summary-detail.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'daily-summary-detail-body.dart'; 3 | 4 | class DailySummaryDetailScreen extends StatelessWidget { 5 | static String routeName = '/dailysummarydetail'; 6 | const DailySummaryDetailScreen({ Key? key }) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return DailySummaryDetailBody(); 11 | } 12 | } -------------------------------------------------------------------------------- /lib/screen/daily-summary-detail/widget/appbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:nutrition/config/config.dart'; 4 | 5 | class DailySummaryDetailScreenAppBar extends StatelessWidget { 6 | const DailySummaryDetailScreenAppBar({ 7 | Key ? key 8 | }): super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return InkWell( 13 | onTap: (){ 14 | Navigator.pop(context); 15 | }, 16 | child: Container( 17 | height: 100. w, 18 | color: Colors.transparent, 19 | child: Row( 20 | children: [ 21 | Container( 22 | height: 50. w, 23 | width: 50. w, 24 | decoration: BoxDecoration( 25 | color: AppColors.colorTint200, 26 | borderRadius: BorderRadius.circular(15) 27 | ), 28 | child: Center( 29 | child: Icon( 30 | Icons.arrow_back, 31 | color: AppColors.colorPrimary, 32 | size: 25.sp, 33 | ) 34 | ) 35 | ), 36 | ], 37 | ), 38 | ), 39 | ); 40 | } 41 | } -------------------------------------------------------------------------------- /lib/screen/daily-summary-detail/widget/date.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nutrition/config/config.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | 5 | class Date extends StatelessWidget { 6 | const Date({ Key? key }) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | margin: EdgeInsets.only(top:10.w), 12 | child: Column( 13 | crossAxisAlignment: CrossAxisAlignment.start, 14 | mainAxisAlignment: MainAxisAlignment.center, 15 | children: [ 16 | Text( 17 | 'Today', 18 | style: TextStyle( 19 | color: AppColors.colorTint500, 20 | fontSize: 14. sp, 21 | fontWeight: FontWeight.bold 22 | ), 23 | ), 24 | SizedBox(height: 7. w), 25 | Text( 26 | 'Wed, 18 Aug', 27 | style: TextStyle( 28 | color: Colors.black, 29 | fontSize: 24. sp, 30 | fontWeight: FontWeight.bold 31 | ), 32 | ) 33 | ] 34 | ), 35 | ); 36 | } 37 | } -------------------------------------------------------------------------------- /lib/screen/daily-summary-detail/widget/meals-consumed.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | import 'package:nutrition/config/config.dart'; 4 | import 'package:nutrition/model/model.dart'; 5 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 6 | import 'package:nutrition/widget/meal-consumed-tile.dart'; 7 | 8 | 9 | class MealsConsumed extends StatefulWidget { 10 | const MealsConsumed({ 11 | Key ? key 12 | }): super(key: key); 13 | 14 | @override 15 | State < MealsConsumed > createState() => _MealsConsumedState(); 16 | } 17 | 18 | class _MealsConsumedState extends State < MealsConsumed > { 19 | 20 | List < MealConsumed > mealsConsumed = []; 21 | 22 | @override 23 | void didChangeDependencies() { 24 | provideMealsConsumed(); 25 | super.didChangeDependencies(); 26 | } 27 | 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return ListView.builder( 32 | itemCount: mealsConsumed.length, 33 | scrollDirection: Axis.vertical, 34 | shrinkWrap: true, 35 | physics: NeverScrollableScrollPhysics(), 36 | padding: EdgeInsets.only(bottom:15.w), 37 | itemBuilder: (BuildContext context, int index) { 38 | return mealConsumedTile(mealsConsumed[index]); 39 | } 40 | ); 41 | } 42 | 43 | void provideMealsConsumed() { 44 | mealsConsumed.add( 45 | MealConsumed( 46 | mealAmount: '407', 47 | mealName: 'Breakfast', 48 | progressValue: 50, 49 | consumedFoods: [ 50 | FoodConsumed( 51 | foodName: 'Espresso coffe', 52 | consumedAmount: '30 ml', 53 | boxColor: AppColors.colorTint200, 54 | icon: SvgPicture.asset( 55 | 'assets/icons/tea.svg', 56 | width: 25. w, 57 | height: 25. w 58 | ), 59 | ), 60 | FoodConsumed( 61 | foodName: 'Croissant', 62 | consumedAmount: '100 ml', 63 | boxColor: AppColors.colorErrorLight, 64 | icon: SvgPicture.asset( 65 | 'assets/icons/croissant.svg', 66 | width: 25. w, 67 | height: 25. w 68 | ), 69 | ) 70 | ] 71 | ) 72 | ); 73 | 74 | mealsConsumed.add( 75 | MealConsumed( 76 | mealAmount: '352', 77 | mealName: 'Lunch', 78 | progressValue: 70, 79 | consumedFoods: [ 80 | FoodConsumed( 81 | foodName: 'Chicken breast', 82 | consumedAmount: '200 g', 83 | boxColor: AppColors.colorTint200, 84 | icon: SvgPicture.asset( 85 | 'assets/icons/chicken.svg', 86 | width: 25. w, 87 | height: 25. w 88 | ), 89 | ), 90 | FoodConsumed( 91 | foodName: 'Green salad', 92 | consumedAmount: '100 g', 93 | boxColor: AppColors.colorErrorLight, 94 | icon: SvgPicture.asset( 95 | 'assets/icons/salad.svg', 96 | width: 25. w, 97 | height: 25. w 98 | ), 99 | ) 100 | ] 101 | ) 102 | ); 103 | 104 | mealsConsumed.add( 105 | MealConsumed( 106 | mealAmount: '635', 107 | mealName: 'Dinner', 108 | progressValue: 30, 109 | consumedFoods: [ 110 | FoodConsumed( 111 | foodName: 'Pasta with tomato sauce', 112 | consumedAmount: '160 g', 113 | boxColor: AppColors.colorTint200, 114 | icon: SvgPicture.asset( 115 | 'assets/icons/pasta.svg', 116 | width: 25. w, 117 | height: 25. w 118 | ), 119 | ), 120 | ] 121 | ) 122 | ); 123 | } 124 | } -------------------------------------------------------------------------------- /lib/screen/daily-summary-detail/widget/remaining-calorie.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:nutrition/config/config.dart'; 5 | import 'package:nutrition/screen/screen.dart'; 6 | import 'package:percent_indicator/linear_percent_indicator.dart'; 7 | 8 | class RemainingCalorie extends StatelessWidget { 9 | const RemainingCalorie({ 10 | Key ? key 11 | }): super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container( 16 | height: 60. w, 17 | margin: EdgeInsets.only(bottom: 20. w), 18 | child: Row( 19 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 20 | crossAxisAlignment: CrossAxisAlignment.center, 21 | children: [ 22 | SizedBox( 23 | width: 250. w, 24 | height: 40. w, 25 | child: Column( 26 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 27 | children: [ 28 | Row( 29 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 30 | children: [ 31 | Text( 32 | 'Remaining', 33 | style: TextStyle( 34 | color: AppColors.colorTint500, 35 | fontSize: 15. sp, 36 | fontWeight: FontWeight.bold 37 | ), 38 | ), 39 | Row( 40 | children: [ 41 | Text( 42 | '1,112', 43 | style: TextStyle( 44 | color: Colors.black, 45 | fontSize: 16. sp, 46 | fontWeight: FontWeight.bold 47 | ), 48 | ), 49 | SizedBox(width: 5. w, ), 50 | Text( 51 | 'kcal', 52 | style: TextStyle( 53 | color: AppColors.colorTint500, 54 | fontSize: 12. sp, 55 | ), 56 | ), 57 | ], 58 | ), 59 | ], 60 | ), 61 | LinearPercentIndicator( 62 | width: 250. w, 63 | animation: true, 64 | lineHeight: 6, 65 | animationDuration: 2500, 66 | percent: 0.8, 67 | barRadius: Radius.circular(3), 68 | progressColor: AppColors.colorPrimary, 69 | padding: EdgeInsets.zero, 70 | backgroundColor: AppColors.colorTint600.withOpacity(0.2), 71 | ), 72 | ], 73 | ), 74 | ), 75 | GestureDetector( 76 | onTap: (){ 77 | Navigator.popAndPushNamed(context, AddFoodScreen.routeName); 78 | }, 79 | child: Container( 80 | height: 60. w, 81 | width: 60. w, 82 | decoration: BoxDecoration( 83 | color: AppColors.colorPrimary, 84 | borderRadius: BorderRadius.circular(20) 85 | ), 86 | child: Icon( 87 | Icons.add, 88 | color: Colors.white, 89 | size: 27. sp, 90 | ) 91 | ), 92 | ) 93 | ], 94 | ), 95 | ); 96 | } 97 | } -------------------------------------------------------------------------------- /lib/screen/home/home-body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'widget/appbar.dart'; 4 | import 'widget/daily-calorie-statistics.dart'; 5 | import 'widget/daily-summary.dart'; 6 | import 'widget/meal-consumed.dart'; 7 | 8 | class HomeBody extends StatelessWidget { 9 | 10 | const HomeBody({ 11 | Key ? key 12 | }): super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | backgroundColor: Colors.white, 18 | body: Container( 19 | margin: EdgeInsets.only(right: 15. w, left: 15. w), 20 | child: ListView( 21 | physics: BouncingScrollPhysics(), 22 | children: const [ 23 | HomeScreenAppBar(), 24 | DailySummary(), 25 | DailyCalorieStatistics(), 26 | MealConsumed() 27 | ], 28 | ), 29 | ), 30 | ); 31 | } 32 | } -------------------------------------------------------------------------------- /lib/screen/home/home.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'home-body.dart'; 3 | 4 | class HomeScreen extends StatelessWidget { 5 | 6 | static String routeName = '/home'; 7 | const HomeScreen({ Key? key }) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return HomeBody(); 12 | } 13 | } -------------------------------------------------------------------------------- /lib/screen/home/widget/appbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:nutrition/config/config.dart'; 5 | 6 | class HomeScreenAppBar extends StatelessWidget { 7 | const HomeScreenAppBar({ 8 | Key ? key 9 | }): super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Container( 14 | height: 100. w, 15 | color: Colors.transparent, 16 | child: Row( 17 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 18 | children: [ 19 | Column( 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | mainAxisAlignment: MainAxisAlignment.center, 22 | children: [ 23 | Text( 24 | 'Today', 25 | style: TextStyle( 26 | color: AppColors.colorTint500, 27 | fontSize: 14. sp, 28 | fontWeight: FontWeight.bold 29 | ), 30 | ), 31 | SizedBox(height: 7. w), 32 | Text( 33 | 'Wed, 18 Aug', 34 | style: TextStyle( 35 | color: Colors.black, 36 | fontSize: 16. sp, 37 | fontWeight: FontWeight.bold 38 | ), 39 | ) 40 | ] 41 | ), 42 | Container( 43 | height: 45. w, 44 | width: 45. w, 45 | decoration: BoxDecoration( 46 | color: AppColors.colorTint200, 47 | borderRadius: BorderRadius.circular(15) 48 | ), 49 | child: Center( 50 | child: SvgPicture.asset( 51 | 'assets/icons/calendar.svg', 52 | color: AppColors.colorPrimary, 53 | width: 25. w, 54 | height: 25. w 55 | ), 56 | ) 57 | ), 58 | ], 59 | ), 60 | ); 61 | } 62 | } -------------------------------------------------------------------------------- /lib/screen/home/widget/daily-calorie-statistics.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:nutrition/config/config.dart'; 5 | import 'package:nutrition/widget/widget.dart'; 6 | 7 | class DailyCalorieStatistics extends StatelessWidget { 8 | const DailyCalorieStatistics({ 9 | Key ? key 10 | }): super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return AspectRatio( 15 | aspectRatio: 2, 16 | child: Container( 17 | margin: EdgeInsets.only(top: 18. w), 18 | child: Row( 19 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 20 | children: [ 21 | statisticsTile( 22 | title: 'Intaked', 23 | icon: FaIcon( 24 | FontAwesomeIcons.pizzaSlice, 25 | color: Colors.orange, 26 | ), 27 | progressColor: AppColors.colorAccent, 28 | value: 589, 29 | progressPercent: 0.4 30 | ), 31 | SizedBox(width: 15. w, ), 32 | statisticsTile( 33 | title: 'Burned', 34 | icon: FaIcon( 35 | FontAwesomeIcons.fire, 36 | color: Colors.red, 37 | ), 38 | progressColor: Colors.redAccent, 39 | value: 738, 40 | progressPercent: 0.7 41 | ), 42 | ], 43 | ), 44 | ), 45 | ); 46 | } 47 | } -------------------------------------------------------------------------------- /lib/screen/home/widget/daily-summary.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:nutrition/config/config.dart'; 4 | import 'package:nutrition/screen/screen.dart'; 5 | import 'package:percent_indicator/linear_percent_indicator.dart'; 6 | 7 | class DailySummary extends StatelessWidget { 8 | const DailySummary({ 9 | Key ? key 10 | }): super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return InkWell( 15 | onTap: (){ 16 | Navigator.pushNamed(context, DailySummaryDetailScreen.routeName); 17 | }, 18 | child: AspectRatio( 19 | aspectRatio: 1.6, 20 | child: Container( 21 | padding: EdgeInsets.all(18. w), 22 | decoration: BoxDecoration( 23 | color: AppColors.colorPrimary, 24 | borderRadius: BorderRadius.circular(30), 25 | ), 26 | child: Row( 27 | crossAxisAlignment: CrossAxisAlignment.center, 28 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 29 | children: [ 30 | _circleProgress(), 31 | _macronutrients() 32 | 33 | ], 34 | ), 35 | ), 36 | ), 37 | ); 38 | } 39 | 40 | Widget _circleProgress() { 41 | return SizedBox( 42 | width: 160. w, 43 | height: 160. w, 44 | child: Stack( 45 | children: [ 46 | SizedBox( 47 | width: 160. w, 48 | height: 160. w, 49 | child: CircularProgressIndicator( 50 | strokeWidth: 8. w, 51 | value: 0.7, 52 | backgroundColor: AppColors.colorTint100.withOpacity(0.2), 53 | valueColor: AlwaysStoppedAnimation < Color > (Colors.white), 54 | ), 55 | ), 56 | Align( 57 | alignment: Alignment.center, 58 | child: Container( 59 | width: double.infinity, 60 | height: double.infinity, 61 | margin: EdgeInsets.all(13. w), 62 | decoration: BoxDecoration( 63 | shape: BoxShape.circle, 64 | border: Border.all(color: AppColors.colorTint100.withOpacity(0.2), width: 8. w), 65 | ), 66 | child: Container( 67 | decoration: BoxDecoration( 68 | shape: BoxShape.circle, 69 | color: AppColors.colorTint100.withOpacity(0.1), 70 | ), 71 | child: Container( 72 | margin: EdgeInsets.all(22. w), 73 | child: Column( 74 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 75 | children: [ 76 | Text( 77 | 'Remaining', 78 | style: TextStyle( 79 | color: AppColors.colorTint300, 80 | fontSize: 12. sp, 81 | ), 82 | ), 83 | Text( 84 | '1,112', 85 | style: TextStyle( 86 | color: Colors.white, 87 | fontSize: 22. sp, 88 | fontWeight: FontWeight.bold 89 | ), 90 | ), 91 | Text( 92 | 'kcal', 93 | style: TextStyle( 94 | color: AppColors.colorTint300, 95 | fontSize: 12. sp, 96 | ), 97 | ), 98 | ], 99 | ), 100 | ), 101 | ), 102 | ), 103 | ) 104 | ], 105 | ), 106 | ); 107 | } 108 | 109 | Widget _macronutrients() { 110 | return Column( 111 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 112 | children: [ 113 | _macronutrientsTile(title: 'Carbs', percentValue: 0.4, amountInGram: '14/323g'), 114 | _macronutrientsTile(title: 'Proteins', percentValue: 0.8, amountInGram: '14/129g'), 115 | _macronutrientsTile(title: 'Fats', percentValue: 0.2, amountInGram: '14/85g') 116 | ] 117 | ); 118 | } 119 | 120 | Widget _macronutrientsTile({ 121 | String ? title, 122 | double ? percentValue, 123 | String ? amountInGram 124 | }) { 125 | return SizedBox( 126 | height: 50. w, 127 | width: 120. w, 128 | child: Column( 129 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 130 | crossAxisAlignment: CrossAxisAlignment.start, 131 | children: [ 132 | Text( 133 | title!, 134 | style: TextStyle( 135 | color: Colors.white, 136 | fontSize: 14. sp, 137 | ), 138 | ), 139 | LinearPercentIndicator( 140 | width: 120. w, 141 | animation: true, 142 | lineHeight: 6, 143 | animationDuration: 2500, 144 | percent: percentValue!, 145 | barRadius: Radius.circular(3), 146 | progressColor: Colors.white, 147 | padding: EdgeInsets.zero, 148 | backgroundColor: AppColors.colorTint100.withOpacity(0.2), 149 | ), 150 | Text( 151 | amountInGram!, 152 | style: TextStyle( 153 | color: Colors.white, 154 | fontSize: 12. sp, 155 | ), 156 | ), 157 | ], 158 | ), 159 | ); 160 | } 161 | } -------------------------------------------------------------------------------- /lib/screen/home/widget/meal-consumed.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | import 'package:nutrition/config/config.dart'; 5 | import 'package:nutrition/model/model.dart'; 6 | 7 | class MealConsumed extends StatefulWidget { 8 | const MealConsumed({ 9 | Key ? key 10 | }): super(key: key); 11 | 12 | @override 13 | State < MealConsumed > createState() => _MealConsumedState(); 14 | } 15 | 16 | class _MealConsumedState extends State < MealConsumed > { 17 | List < FoodConsumed > consumedFoods = []; 18 | @override 19 | void didChangeDependencies() { 20 | provideConsumedFoods(); 21 | super.didChangeDependencies(); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return ConstrainedBox( 27 | constraints: BoxConstraints( 28 | maxHeight: double.infinity, 29 | ), 30 | child: Container( 31 | margin: EdgeInsets.only(top: 30. w, bottom: 30. w), 32 | padding: EdgeInsets.only(left: 10. w), 33 | child: Column( 34 | children: [ 35 | SizedBox( 36 | height: 40. w, 37 | child: Row( 38 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 39 | children: [ 40 | Row( 41 | children: [ 42 | SizedBox( 43 | height: 25. w, 44 | width: 25. w, 45 | child: CircularProgressIndicator( 46 | strokeWidth: 4. w, 47 | value: 0.7, 48 | backgroundColor: AppColors.colorAccent.withOpacity(0.2), 49 | valueColor: AlwaysStoppedAnimation < Color > (AppColors.colorAccent), 50 | ), 51 | ), 52 | SizedBox(width: 20. w), 53 | Text( 54 | 'Breakfast', 55 | style: TextStyle( 56 | color: AppColors.colorTint700, 57 | fontWeight: FontWeight.bold, 58 | fontSize: 16. sp, 59 | ), 60 | ), 61 | ], 62 | ), 63 | Row( 64 | children: [ 65 | Text( 66 | '407', 67 | style: TextStyle( 68 | color: AppColors.colorTint500, 69 | fontWeight: FontWeight.bold, 70 | fontSize: 16. sp, 71 | ), 72 | ), 73 | SizedBox(width: 1. w), 74 | Text( 75 | 'kcal', 76 | style: TextStyle( 77 | color: AppColors.colorTint500, 78 | fontWeight: FontWeight.bold, 79 | fontSize: 12. sp, 80 | ), 81 | ), 82 | ], 83 | ), 84 | ], 85 | ), 86 | ), 87 | SizedBox(height: 20. w), 88 | ListView.builder( 89 | itemCount: consumedFoods.length, 90 | scrollDirection: Axis.vertical, 91 | shrinkWrap: true, 92 | physics: NeverScrollableScrollPhysics(), 93 | padding: EdgeInsets.zero, 94 | itemBuilder: (BuildContext context, int index) { 95 | return Container( 96 | height: 70. w, 97 | margin: EdgeInsets.zero, 98 | child: IntrinsicHeight( 99 | child: Row( 100 | crossAxisAlignment: CrossAxisAlignment.center, 101 | children: [ 102 | VerticalDivider( 103 | color: AppColors.colorTint300, 104 | thickness: 2, 105 | ), 106 | SizedBox(width: 15. w), 107 | Container( 108 | height: 54. w, 109 | width: 54. w, 110 | decoration: BoxDecoration( 111 | color: consumedFoods[index].boxColor, 112 | borderRadius: BorderRadius.circular(20) 113 | ), 114 | child: Center( 115 | child: consumedFoods[index].icon 116 | ), 117 | ), 118 | SizedBox(width: 15. w), 119 | Column( 120 | crossAxisAlignment: CrossAxisAlignment.start, 121 | mainAxisAlignment: MainAxisAlignment.center, 122 | children: [ 123 | Text( 124 | consumedFoods[index].foodName!, 125 | style: TextStyle( 126 | color: AppColors.colorTint700, 127 | fontSize: 15. sp, 128 | fontWeight: FontWeight.bold 129 | ), 130 | ), 131 | SizedBox(height: 5. w), 132 | Text( 133 | consumedFoods[index].consumedAmount!, 134 | style: TextStyle( 135 | color: AppColors.colorTint500, 136 | fontWeight: FontWeight.bold, 137 | fontSize: 12. sp, 138 | ), 139 | ), 140 | ], 141 | ) 142 | ] 143 | ) 144 | ), 145 | ); 146 | }, 147 | ), 148 | ], 149 | ), 150 | ), 151 | ); 152 | } 153 | 154 | 155 | void provideConsumedFoods() { 156 | consumedFoods.add( 157 | FoodConsumed( 158 | foodName: 'Espresso coffe', 159 | consumedAmount: '30 ml', 160 | boxColor: AppColors.colorTint200, 161 | icon: SvgPicture.asset( 162 | 'assets/icons/tea.svg', 163 | width: 25. w, 164 | height: 25. w 165 | ), 166 | ) 167 | ); 168 | 169 | consumedFoods.add( 170 | FoodConsumed( 171 | foodName: 'Croissant', 172 | consumedAmount: '100 ml', 173 | boxColor: AppColors.colorErrorLight, 174 | icon:SvgPicture.asset( 175 | 'assets/icons/croissant.svg', 176 | width: 25. w, 177 | height: 25. w 178 | ), 179 | ) 180 | ); 181 | } 182 | } -------------------------------------------------------------------------------- /lib/screen/nav/nav.dart: -------------------------------------------------------------------------------- 1 | import 'package:dot_navigation_bar/dot_navigation_bar.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | import 'package:nutrition/config/config.dart'; 6 | import 'package:nutrition/screen/screen.dart'; 7 | 8 | class Nav extends StatefulWidget { 9 | static String routeName = '/nav'; 10 | const Nav({ 11 | Key ? key 12 | }): super(key: key); 13 | 14 | @override 15 | _NavState createState() => _NavState(); 16 | } 17 | 18 | 19 | 20 | class _NavState extends State < Nav > { 21 | 22 | int _currentIndex = 0; 23 | 24 | void changePage(int index) { 25 | setState(() { 26 | _currentIndex = index; 27 | }); 28 | } 29 | final pages = [HomeScreen(), Container(), Container(), Container(), Container()]; 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Scaffold( 34 | body: pages[_currentIndex], 35 | bottomNavigationBar: DotNavigationBar( 36 | currentIndex: _currentIndex, 37 | onTap: changePage, 38 | dotIndicatorColor: _currentIndex == 2 ? Colors.transparent : AppColors.colorPrimary, 39 | borderRadius: 0, 40 | backgroundColor: Colors.white, 41 | enablePaddingAnimation: false, 42 | marginR: EdgeInsets.zero, 43 | paddingR: EdgeInsets.zero, 44 | items: [ 45 | DotNavigationBarItem( 46 | icon: FaIcon( 47 | FontAwesomeIcons.house, 48 | size: 20. sp, 49 | ), 50 | selectedColor: AppColors.colorPrimary, 51 | unselectedColor: AppColors.colorTint400 52 | ), 53 | DotNavigationBarItem( 54 | icon: FaIcon( 55 | FontAwesomeIcons.search, 56 | size: 20. sp, 57 | ), 58 | selectedColor: AppColors.colorPrimary, 59 | unselectedColor: AppColors.colorTint400 60 | ), 61 | DotNavigationBarItem( 62 | icon: Container( 63 | height: 48. w, 64 | width: 48. w, 65 | decoration: BoxDecoration( 66 | borderRadius: BorderRadius.circular(10), 67 | color: AppColors.colorPrimary, 68 | ), 69 | child: Center( 70 | child: FaIcon( 71 | FontAwesomeIcons.barcode, 72 | size: 20. sp, 73 | ), 74 | ), 75 | ), 76 | selectedColor: Colors.white, 77 | unselectedColor: Colors.white, 78 | ), 79 | DotNavigationBarItem( 80 | icon: FaIcon( 81 | FontAwesomeIcons.chartLine, 82 | size: 20. sp, 83 | ), 84 | selectedColor: AppColors.colorPrimary, 85 | unselectedColor: AppColors.colorTint400 86 | ), 87 | DotNavigationBarItem( 88 | icon: FaIcon( 89 | FontAwesomeIcons.user, 90 | size: 20. sp, 91 | ), 92 | selectedColor: AppColors.colorPrimary, 93 | unselectedColor: AppColors.colorTint400 94 | ), 95 | ], 96 | ), 97 | ); 98 | } 99 | } -------------------------------------------------------------------------------- /lib/screen/screen.dart: -------------------------------------------------------------------------------- 1 | export 'home/home.dart'; 2 | export 'nav/nav.dart'; 3 | export 'daily-summary-detail/daily-summary-detail.dart'; 4 | export 'add-food/add-food.dart'; -------------------------------------------------------------------------------- /lib/widget/meal-consumed-tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nutrition/config/config.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:nutrition/model/model.dart'; 5 | 6 | Widget mealConsumedTile(MealConsumed mealConsumed) { 7 | return ConstrainedBox( 8 | constraints: BoxConstraints( 9 | maxHeight: double.infinity, 10 | ), 11 | child: Container( 12 | margin: EdgeInsets.only(top: 30. w, bottom: 30. w), 13 | padding: EdgeInsets.only(left: 10. w), 14 | child: Column( 15 | children: [ 16 | SizedBox( 17 | height: 40. w, 18 | child: Row( 19 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 20 | children: [ 21 | Row( 22 | children: [ 23 | SizedBox( 24 | height: 25. w, 25 | width: 25. w, 26 | child: CircularProgressIndicator( 27 | strokeWidth: 4. w, 28 | value: mealConsumed.progressValue! / 100, 29 | backgroundColor: AppColors.colorAccent.withOpacity(0.2), 30 | valueColor: AlwaysStoppedAnimation < Color > (AppColors.colorAccent), 31 | ), 32 | ), 33 | SizedBox(width: 20. w), 34 | Text( 35 | mealConsumed.mealName!, 36 | style: TextStyle( 37 | color: AppColors.colorTint700, 38 | fontWeight: FontWeight.bold, 39 | fontSize: 16. sp, 40 | ), 41 | ), 42 | ], 43 | ), 44 | Row( 45 | children: [ 46 | Text( 47 | mealConsumed.mealAmount!, 48 | style: TextStyle( 49 | color: AppColors.colorTint500, 50 | fontWeight: FontWeight.bold, 51 | fontSize: 16. sp, 52 | ), 53 | ), 54 | SizedBox(width: 1. w), 55 | Text( 56 | 'kcal', 57 | style: TextStyle( 58 | color: AppColors.colorTint500, 59 | fontWeight: FontWeight.bold, 60 | fontSize: 12. sp, 61 | ), 62 | ), 63 | ], 64 | ), 65 | ], 66 | ), 67 | ), 68 | SizedBox(height: 20. w), 69 | ListView.builder( 70 | itemCount: mealConsumed.consumedFoods!.length, 71 | scrollDirection: Axis.vertical, 72 | shrinkWrap: true, 73 | physics: NeverScrollableScrollPhysics(), 74 | padding: EdgeInsets.zero, 75 | itemBuilder: (BuildContext context, int index) { 76 | return Container( 77 | height: 70. w, 78 | margin: EdgeInsets.zero, 79 | child: IntrinsicHeight( 80 | child: Row( 81 | crossAxisAlignment: CrossAxisAlignment.center, 82 | children: [ 83 | VerticalDivider( 84 | color: AppColors.colorTint300, 85 | thickness: 2, 86 | ), 87 | SizedBox(width: 15. w), 88 | Container( 89 | height: 54. w, 90 | width: 54. w, 91 | decoration: BoxDecoration( 92 | color: mealConsumed.consumedFoods![index].boxColor, 93 | borderRadius: BorderRadius.circular(20) 94 | ), 95 | child: Center( 96 | child: mealConsumed.consumedFoods![index].icon 97 | ), 98 | ), 99 | SizedBox(width: 15. w), 100 | Column( 101 | crossAxisAlignment: CrossAxisAlignment.start, 102 | mainAxisAlignment: MainAxisAlignment.center, 103 | children: [ 104 | Text( 105 | mealConsumed.consumedFoods![index].foodName!, 106 | style: TextStyle( 107 | color: AppColors.colorTint700, 108 | fontSize: 15. sp, 109 | fontWeight: FontWeight.bold 110 | ), 111 | ), 112 | SizedBox(height: 5. w), 113 | Text( 114 | mealConsumed.consumedFoods![index].consumedAmount!, 115 | style: TextStyle( 116 | color: AppColors.colorTint500, 117 | fontWeight: FontWeight.bold, 118 | fontSize: 12. sp, 119 | ), 120 | ), 121 | ], 122 | ) 123 | ] 124 | ) 125 | ), 126 | ); 127 | }, 128 | ), 129 | ], 130 | ), 131 | ), 132 | ); 133 | } -------------------------------------------------------------------------------- /lib/widget/statistics-tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | import 'package:nutrition/config/config.dart'; 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 | import 'package:percent_indicator/linear_percent_indicator.dart'; 6 | 7 | Widget statisticsTile({ Color ? progressColor, String ? title, FaIcon ? icon, double ? value, double ? progressPercent, String ? unitName }) { 8 | return Expanded( 9 | child: Container( 10 | padding: EdgeInsets.all(20), 11 | decoration: BoxDecoration( 12 | color: Colors.transparent, 13 | border: Border.all(color: AppColors.colorTint400), 14 | borderRadius: BorderRadius.circular(25) 15 | ), 16 | child: Column( 17 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 18 | crossAxisAlignment: CrossAxisAlignment.start, 19 | children: [ 20 | Row( 21 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 22 | children: [ 23 | Text( 24 | title!, 25 | style: TextStyle( 26 | color: AppColors.colorTint700, 27 | fontWeight: FontWeight.bold, 28 | fontSize: 18. sp 29 | ), 30 | ), 31 | icon!, 32 | ], 33 | ), 34 | Row( 35 | children: [ 36 | RotatedBox( 37 | quarterTurns: -1, 38 | child: LinearPercentIndicator( 39 | width: 60. w, 40 | animation: true, 41 | lineHeight: 6, 42 | animationDuration: 2500, 43 | percent: progressPercent!, 44 | barRadius: Radius.circular(3), 45 | progressColor: progressColor!, 46 | padding: EdgeInsets.zero, 47 | backgroundColor: AppColors.colorTint400.withOpacity(0.4), 48 | ), 49 | ), 50 | SizedBox(width: 20. w), 51 | Column( 52 | crossAxisAlignment: CrossAxisAlignment.start, 53 | children: [ 54 | Text( 55 | value.toString(), 56 | style: TextStyle( 57 | color: AppColors.colorTint700, 58 | fontSize: 20. sp, 59 | fontWeight: FontWeight.bold 60 | ), 61 | ), 62 | SizedBox(height: 5. w), 63 | Text( 64 | unitName ?? 'kcal', 65 | style: TextStyle( 66 | color: AppColors.colorTint600, 67 | fontSize: 12. sp, 68 | ), 69 | ), 70 | ], 71 | ) 72 | ], 73 | ), 74 | ], 75 | ), 76 | ), 77 | ); 78 | } -------------------------------------------------------------------------------- /lib/widget/widget.dart: -------------------------------------------------------------------------------- 1 | export 'statistics-tile.dart'; -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.8.1" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.3.1" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0" 46 | cupertino_icons: 47 | dependency: "direct main" 48 | description: 49 | name: cupertino_icons 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.4" 53 | dot_navigation_bar: 54 | dependency: "direct main" 55 | description: 56 | name: dot_navigation_bar 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.0.1+4" 60 | fake_async: 61 | dependency: transitive 62 | description: 63 | name: fake_async 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.2.0" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_lints: 73 | dependency: "direct dev" 74 | description: 75 | name: flutter_lints 76 | url: "https://pub.dartlang.org" 77 | source: hosted 78 | version: "1.0.4" 79 | flutter_screenutil: 80 | dependency: "direct main" 81 | description: 82 | name: flutter_screenutil 83 | url: "https://pub.dartlang.org" 84 | source: hosted 85 | version: "5.4.0+1" 86 | flutter_svg: 87 | dependency: "direct main" 88 | description: 89 | name: flutter_svg 90 | url: "https://pub.dartlang.org" 91 | source: hosted 92 | version: "0.23.0+1" 93 | flutter_test: 94 | dependency: "direct dev" 95 | description: flutter 96 | source: sdk 97 | version: "0.0.0" 98 | font_awesome_flutter: 99 | dependency: "direct main" 100 | description: 101 | name: font_awesome_flutter 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "10.1.0" 105 | lints: 106 | dependency: transitive 107 | description: 108 | name: lints 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.0.1" 112 | matcher: 113 | dependency: transitive 114 | description: 115 | name: matcher 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "0.12.10" 119 | meta: 120 | dependency: transitive 121 | description: 122 | name: meta 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "1.7.0" 126 | path: 127 | dependency: transitive 128 | description: 129 | name: path 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "1.8.0" 133 | path_drawing: 134 | dependency: transitive 135 | description: 136 | name: path_drawing 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "0.5.1+1" 140 | path_parsing: 141 | dependency: transitive 142 | description: 143 | name: path_parsing 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "0.2.1" 147 | percent_indicator: 148 | dependency: "direct main" 149 | description: 150 | name: percent_indicator 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "4.0.0" 154 | petitparser: 155 | dependency: transitive 156 | description: 157 | name: petitparser 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "4.4.0" 161 | sky_engine: 162 | dependency: transitive 163 | description: flutter 164 | source: sdk 165 | version: "0.0.99" 166 | source_span: 167 | dependency: transitive 168 | description: 169 | name: source_span 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.8.1" 173 | stack_trace: 174 | dependency: transitive 175 | description: 176 | name: stack_trace 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.10.0" 180 | stream_channel: 181 | dependency: transitive 182 | description: 183 | name: stream_channel 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "2.1.0" 187 | string_scanner: 188 | dependency: transitive 189 | description: 190 | name: string_scanner 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.1.0" 194 | term_glyph: 195 | dependency: transitive 196 | description: 197 | name: term_glyph 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "1.2.0" 201 | test_api: 202 | dependency: transitive 203 | description: 204 | name: test_api 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "0.4.2" 208 | typed_data: 209 | dependency: transitive 210 | description: 211 | name: typed_data 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "1.3.0" 215 | vector_math: 216 | dependency: transitive 217 | description: 218 | name: vector_math 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "2.1.0" 222 | xml: 223 | dependency: transitive 224 | description: 225 | name: xml 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "5.3.1" 229 | sdks: 230 | dart: ">=2.14.0 <3.0.0" 231 | flutter: ">=1.24.0-7.0" 232 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: nutrition 2 | description: A new Flutter project. 3 | 4 | publish_to: 'none' 5 | 6 | 7 | version: 1.0.0+1 8 | 9 | environment: 10 | sdk: ">=2.12.0 <3.0.0" 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | 16 | cupertino_icons: ^1.0.2 17 | 18 | #svg 19 | flutter_svg: ^0.23.0+1 20 | # linaer percent inicator 21 | percent_indicator: ^4.0.0 22 | # screen util 23 | flutter_screenutil: ^5.0.1 24 | #icon 25 | font_awesome_flutter: 10.1.0 26 | # bottom navigation bar 27 | dot_navigation_bar: ^1.0.1+4 28 | 29 | dev_dependencies: 30 | flutter_test: 31 | sdk: flutter 32 | 33 | flutter_lints: ^1.0.0 34 | 35 | flutter: 36 | 37 | uses-material-design: true 38 | 39 | assets: 40 | - assets/icons/ 41 | - assets/images/ 42 | 43 | fonts: 44 | - family: Muli 45 | fonts: 46 | - asset: assets/fonts/muli/Muli.ttf 47 | - asset: assets/fonts/muli/Muli-Bold.ttf 48 | weight: 700 49 | - asset: assets/fonts/muli/Muli-Light.ttf 50 | weight: 300 51 | -------------------------------------------------------------------------------- /screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/screenshot.jpg -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:nutrition/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahdinazmi/Flutter-Nutrition-UI/4d633d22b747814222c948ee63cbbc4d001b29ee/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | nutrition 30 | 31 | 32 | 33 | 36 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nutrition", 3 | "short_name": "nutrition", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | --------------------------------------------------------------------------------