├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-50x50@1x.png │ │ │ ├── Icon-App-50x50@2x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj └── .gitignore ├── analysis_options.yaml ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ └── Icon-512.png ├── manifest.json └── index.html ├── assets ├── flare │ ├── tv.flr │ ├── base_one.flr │ ├── food_1.flr │ ├── watch_tv.flr │ ├── WorldSpin.flr │ ├── base_water.flr │ ├── water_flow.flr │ ├── base_two_flow.flr │ ├── bicycle_flow.flr │ └── foodstash_f_0.flr ├── images │ ├── car.png │ ├── driver.png │ ├── eat_1.png │ ├── finaltv.png │ ├── food_1.png │ ├── C1O2_icon.png │ ├── finalcar.png │ ├── food_one.png │ ├── Cooking-pana.png │ ├── Electricar.gif │ ├── Electriccar2.gif │ ├── home_screen.png │ ├── travel_input.png │ ├── result_screen.png │ ├── watching_news.gif │ ├── eating_together.gif │ ├── household_input.png │ └── Pedestrian crossing.gif └── fonts │ └── Orbitron │ ├── static │ ├── Orbitron-Black.ttf │ ├── Orbitron-Bold.ttf │ ├── Orbitron-Medium.ttf │ ├── Orbitron-Regular.ttf │ ├── Orbitron-SemiBold.ttf │ └── Orbitron-ExtraBold.ttf │ └── Orbitron-VariableFont_wght.ttf ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── C1O2 │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── .metadata ├── README.md ├── lib ├── helpers │ ├── colors.dart │ ├── text_theme.dart │ └── helpers.dart ├── screens │ ├── calculator │ │ ├── user_input_questions.dart │ │ └── user_inputs.dart │ ├── home │ │ └── startScreen.dart │ ├── reduce │ │ └── reduce_screen.dart │ └── result │ │ └── result_screen.dart └── main.dart ├── .gitignore ├── test └── widget_test.dart ├── pubspec.yaml └── pubspec.lock /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:lint/analysis_options.yaml -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/web/favicon.png -------------------------------------------------------------------------------- /assets/flare/tv.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/tv.flr -------------------------------------------------------------------------------- /assets/images/car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/car.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/flare/base_one.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/base_one.flr -------------------------------------------------------------------------------- /assets/flare/food_1.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/food_1.flr -------------------------------------------------------------------------------- /assets/flare/watch_tv.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/watch_tv.flr -------------------------------------------------------------------------------- /assets/images/driver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/driver.png -------------------------------------------------------------------------------- /assets/images/eat_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/eat_1.png -------------------------------------------------------------------------------- /assets/images/finaltv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/finaltv.png -------------------------------------------------------------------------------- /assets/images/food_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/food_1.png -------------------------------------------------------------------------------- /assets/flare/WorldSpin.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/WorldSpin.flr -------------------------------------------------------------------------------- /assets/flare/base_water.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/base_water.flr -------------------------------------------------------------------------------- /assets/flare/water_flow.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/water_flow.flr -------------------------------------------------------------------------------- /assets/images/C1O2_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/C1O2_icon.png -------------------------------------------------------------------------------- /assets/images/finalcar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/finalcar.png -------------------------------------------------------------------------------- /assets/images/food_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/food_one.png -------------------------------------------------------------------------------- /assets/flare/base_two_flow.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/base_two_flow.flr -------------------------------------------------------------------------------- /assets/flare/bicycle_flow.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/bicycle_flow.flr -------------------------------------------------------------------------------- /assets/flare/foodstash_f_0.flr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/flare/foodstash_f_0.flr -------------------------------------------------------------------------------- /assets/images/Cooking-pana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/Cooking-pana.png -------------------------------------------------------------------------------- /assets/images/Electricar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/Electricar.gif -------------------------------------------------------------------------------- /assets/images/Electriccar2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/Electriccar2.gif -------------------------------------------------------------------------------- /assets/images/home_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/home_screen.png -------------------------------------------------------------------------------- /assets/images/travel_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/travel_input.png -------------------------------------------------------------------------------- /assets/images/result_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/result_screen.png -------------------------------------------------------------------------------- /assets/images/watching_news.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/watching_news.gif -------------------------------------------------------------------------------- /assets/images/eating_together.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/eating_together.gif -------------------------------------------------------------------------------- /assets/images/household_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/household_input.png -------------------------------------------------------------------------------- /assets/images/Pedestrian crossing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/images/Pedestrian crossing.gif -------------------------------------------------------------------------------- /assets/fonts/Orbitron/static/Orbitron-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/fonts/Orbitron/static/Orbitron-Black.ttf -------------------------------------------------------------------------------- /assets/fonts/Orbitron/static/Orbitron-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/fonts/Orbitron/static/Orbitron-Bold.ttf -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /assets/fonts/Orbitron/static/Orbitron-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/fonts/Orbitron/static/Orbitron-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/Orbitron/static/Orbitron-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/fonts/Orbitron/static/Orbitron-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Orbitron/static/Orbitron-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/fonts/Orbitron/static/Orbitron-SemiBold.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /assets/fonts/Orbitron/Orbitron-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/fonts/Orbitron/Orbitron-VariableFont_wght.ttf -------------------------------------------------------------------------------- /assets/fonts/Orbitron/static/Orbitron-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/assets/fonts/Orbitron/static/Orbitron-ExtraBold.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-hdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-mdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/suvnshr/C1O2/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/C1O2/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.C1O2 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.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: 9b9b543d9265484132c798adaab6caca52055b08 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "C1O2", 3 | "short_name": "C1O2", 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 | } 24 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | # C1O2 6 | 7 | A futuristic app which calculates your carbon footprint due to Travel, Food and Household activities. Gives you tips to reduce your carbon footprints. 8 | 9 | # Download 10 | Download the [app](https://github.com/suvansh-rana/C1O2/releases/tag/1.0). 11 | 12 | # App Preview 13 | 14 | 15 |

16 | 17 |

18 | 19 |

20 | 21 |

22 |

23 | 24 |

25 | 26 |

27 | 28 |

29 | 30 |
31 | -------------------------------------------------------------------------------- /lib/helpers/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/painting.dart'; 2 | 3 | class ColorPallete { 4 | // Provided Pallete 5 | static const Color background = Color(0xFF060645); 6 | static const Color cardBackground = Color(0xFF010218); 7 | static const Color color3 = Color(0xFF05F29B); 8 | static const Color color4 = Color(0xFF115664); 9 | static const Color cardHeading = Color(0xFF12A1A3); 10 | static const Color color6 = Color(0xFF146B8D); 11 | static const Color color7 = Color(0xFF079476); 12 | } 13 | 14 | // Given on Dribble 15 | // https://dribbble.com/colors/079476 16 | // https://dribbble.com/colors/146B8D 17 | // https://dribbble.com/colors/12A1A3 18 | // https://dribbble.com/colors/115664 19 | // https://dribbble.com/colors/05F29B 20 | // https://dribbble.com/colors/010218 21 | // https://dribbble.com/colors/060645 22 | -------------------------------------------------------------------------------- /.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 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/screens/calculator/user_input_questions.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Questions with ChangeNotifier { 4 | List _foodQuestions = [ 5 | "How much Meat, Fish and Eggs do you consume?", 6 | 'How much Grains and Baked Goods do you consume?', 7 | 'How much Dairy Products do you consume?', 8 | 'How much Fruits and Vegetables do you consume?', 9 | ]; 10 | 11 | List _waterQuestions = [ 12 | 'For how much hours Fan was used?', 13 | 'For how much hours T.V. was used?', 14 | 'For how much hours Fridge was used?', 15 | 'How many liters of Water is consumed?', 16 | ]; 17 | 18 | List _travelQuestions = [ 19 | 'What is the distance travelled by bike?', 20 | 'What is the distance travelled by Car?', 21 | 'What is the distance travelled by Bicycle?', 22 | 23 | ]; 24 | 25 | get foodQuestions { 26 | return _foodQuestions; 27 | } 28 | 29 | get travelQuestions { 30 | return _travelQuestions; 31 | } 32 | 33 | get waterQuestions { 34 | return _waterQuestions; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/helpers/text_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'colors.dart'; 3 | 4 | class CoolText extends StatelessWidget { 5 | final String text; 6 | final double fontSize; 7 | final double letterSpacing; 8 | 9 | CoolText( 10 | this.text, { 11 | this.fontSize, 12 | this.letterSpacing, 13 | }); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Text( 18 | text, 19 | style: TextStyle( 20 | color: ColorPallete.color3, 21 | shadows: [ 22 | Shadow( 23 | color: ColorPallete.color3, 24 | blurRadius: 3, 25 | offset: Offset( 26 | 0.9, 27 | 0.9, 28 | ), 29 | ), 30 | Shadow( 31 | color: ColorPallete.color3, 32 | blurRadius: 3, 33 | offset: Offset( 34 | 1.2, 35 | 1.2, 36 | ), 37 | ), 38 | ], 39 | fontSize: fontSize, 40 | fontWeight: FontWeight.w300, 41 | letterSpacing: letterSpacing, 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /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:C1O2/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | C1O2 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /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 | C1O2 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 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.C1O2" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:C1O2/helpers/colors.dart'; 2 | import 'package:C1O2/screens/home/startScreen.dart'; 3 | import 'package:C1O2/screens/reduce/reduce_screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:path_provider/path_provider.dart'; 6 | import 'package:provider/provider.dart'; 7 | 8 | import './screens/result/result_screen.dart'; 9 | import './screens/calculator/user_inputs.dart'; 10 | import './screens/calculator/user_input_questions.dart'; 11 | 12 | void main() { 13 | runApp(MyApp()); 14 | } 15 | 16 | class MyApp extends StatelessWidget { 17 | // This widget is the root of your application. 18 | @override 19 | Widget build(BuildContext context) { 20 | return MultiProvider( 21 | providers: [ChangeNotifierProvider.value(value: Questions())], 22 | child: MaterialApp( 23 | debugShowCheckedModeBanner: false, 24 | title: 'C1O2', 25 | theme: ThemeData( 26 | fontFamily: "Orbitron", 27 | primarySwatch: Colors.indigo, 28 | cursorColor: ColorPallete.color3, 29 | inputDecorationTheme: InputDecorationTheme( 30 | focusedBorder: UnderlineInputBorder( 31 | borderSide: BorderSide( 32 | color: ColorPallete.color3, 33 | )), 34 | ), 35 | // This makes the visual density adapt to the platform that you run 36 | // the app on. For desktop platforms, the controls will be smaller and 37 | // closer together (more dense) than on mobile platforms. 38 | visualDensity: VisualDensity.adaptivePlatformDensity, 39 | ), 40 | initialRoute: StartScreen.routeName, 41 | // home: ResultScreen( 42 | // activityName: "Household", 43 | // userEmission: 70, 44 | // averageEmission: 50, 45 | // ),//HomeScreen.routeName, 46 | routes: { 47 | StartScreen.routeName: (context) => StartScreen(), 48 | UserInputs.routeName: (context) => UserInputs(), 49 | ReduceEmissionScreen.routeName: (context) => ReduceEmissionScreen(), 50 | }, 51 | ), 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: C1O2 2 | description: "A futuristic app which calculates your carbon footprint due to Travel, Food and Household activities. Gives you tips to reduce your carbon footprints." 3 | 4 | 5 | # The following line prevents the package from being accidentally published to 6 | # pub.dev using `pub publish`. This is preferred for private packages. 7 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 8 | 9 | # The following defines the version and build number for your application. 10 | # A version number is three numbers separated by dots, like 1.2.43 11 | # followed by an optional build number separated by a +. 12 | # Both the version and the builder number may be overridden in flutter 13 | # build by specifying --build-name and --build-number, respectively. 14 | # In Android, build-name is used as versionName while build-number used as versionCode. 15 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 16 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 17 | # Read more about iOS versioning at 18 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 19 | version: 1.0.0+1 20 | 21 | environment: 22 | sdk: ">=2.7.0 <3.0.0" 23 | 24 | dependencies: 25 | flutter_launcher_icons: ^0.7.5 26 | flutter_xlider: ^3.4.0 27 | flutter: 28 | sdk: flutter 29 | google_fonts: ^1.1.0 30 | provider: 31 | flare_flutter: ^2.0.4 32 | 33 | animated_text_kit: ^2.2.0 34 | 35 | lint: ^1.0.0 36 | 37 | # The following adds the Cupertino Icons font to your application. 38 | # Use with the CupertinoIcons class for iOS style icons. 39 | cupertino_icons: ^0.1.3 40 | 41 | dev_dependencies: 42 | flutter_test: 43 | sdk: flutter 44 | 45 | flutter_icons: 46 | android: "launcher_icon" 47 | ios: true 48 | image_path: "assets/images/C1O2_icon.png" 49 | 50 | # For information on the generic Dart part of this file, see the 51 | # following page: https://dart.dev/tools/pub/pubspec 52 | 53 | # The following section is specific to Flutter. 54 | flutter: 55 | # The following line ensures that the Material Icons font is 56 | # included with your application, so that you can use the icons in 57 | # the material Icons class. flare_flutter: ^2.0.4 58 | 59 | uses-material-design: true 60 | # To add assets to your application, add an assets section, like this: 61 | assets: 62 | - assets/images/ 63 | - assets/flare/ 64 | # - images/a_dot_ham.jpeg 65 | # An image asset can refer to one or more resolution-specific "variants", see 66 | # https://flutter.dev/assets-and-images/#resolution-aware. 67 | # For details regarding adding assets from package dependencies, see 68 | # https://flutter.dev/assets-and-images/#from-packages 69 | # To add custom fonts to your application, add a fonts section here, 70 | # in this "flutter" section. Each entry in this list should have a 71 | # "family" key with the font family name, and a "fonts" key with a 72 | # list giving the asset and other descriptors for the font. For 73 | # example: 74 | fonts: 75 | - family: "Orbitron" 76 | fonts: 77 | - asset: "assets/fonts/Orbitron/static/Orbitron-Regular.ttf" 78 | - asset: "assets/fonts/Orbitron/static/Orbitron-Bold.ttf" 79 | weight: 700 80 | # - family: Trajan Pro 81 | # fonts: 82 | # - asset: fonts/TrajanPro.ttf 83 | # - asset: fonts/TrajanPro_Bold.ttf 84 | # weight: 700 85 | # 86 | # For details regarding fonts from package dependencies, 87 | # see https://flutter.dev/custom-fonts/#from-packages 88 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /lib/helpers/helpers.dart: -------------------------------------------------------------------------------- 1 | class CarbonFootPrint { 2 | // >> Emission unit = kg of CO2 3 | 4 | // Common electric devices consumptions 5 | 6 | // Assumming that power usage of fan per hour is 65 watts 7 | static final double kwhUsedByFanPerHour = 0.065; 8 | 9 | // Assumming the TV is LED and is 35 inches in size 10 | // Source: https://www.rtings.com/tv/learn/led-oled-power-consumption-and-electricity-cost 11 | static final double kwhUsedByTVPerHour = 0.03; 12 | 13 | // Assuming that power usage of fridge per hour is 250 watt 14 | static final double kwhUsedByFridgePerHour = 0.25; 15 | 16 | // Electricity(kWh) 17 | static final double emissionPerUnitElectricity = 0.475; 18 | 19 | // Water(L) 20 | static final double emissionPerUnitWater = 0.001; 21 | 22 | // Petrol(L) 23 | static final double emissionPerKmCar = 0.313; 24 | 25 | // Diesel(L) 26 | static final double emissionPerKmBike = 0.0687; 27 | 28 | static final double emissionPerKmBicycle = 0.016; 29 | 30 | // Meat, Fish, eggs (calories) 31 | static final double emissionPerUnitCalorieOfMeat = 219.67; 32 | 33 | // grain & baked food (calories) 34 | static final double emissionPerUnitCalorieOfGrain = 15.34; 35 | 36 | // Dairy(calories) 37 | static final double emissionPerUnitCalorieOfDairy = 1.9; 38 | 39 | // Fruits & vegetables (calories) 40 | static final double emissionPerUnitCalorieOfFruit = 1.55; 41 | 42 | // Average 43 | // TODO: DUMMY DATA, FOR EXPERIMENT 44 | static final double avgEmissionDueToHouseHoldPerDay = 10; 45 | static final double avgEmissionDueToFoodPerDay = 10; 46 | static final double avgEmissionDueToTravelPerDay = 10; 47 | 48 | // Get the daily carbon footprint of your household activities 49 | static double getDailyHouseHoldCarbonFootPrint( 50 | double hoursFanUsed, 51 | double hoursTVUsed, 52 | double hoursFridgeUsed, 53 | double litresOfWaterUsed, 54 | ) { 55 | double electrictyComsunptioninKWH = (hoursFanUsed * kwhUsedByFanPerHour + 56 | hoursTVUsed * kwhUsedByTVPerHour + 57 | hoursFridgeUsed * kwhUsedByFridgePerHour); 58 | 59 | double emissionDueToElectricity = 60 | emissionPerUnitElectricity * electrictyComsunptioninKWH; 61 | double emissionDueToWater = emissionPerUnitWater * litresOfWaterUsed; 62 | 63 | return (emissionDueToElectricity + emissionDueToWater) ; 64 | } 65 | 66 | // Get the daily footprint of your travel related activities 67 | static double getDailyTravelFootPrint(double distanceTravelledByBike, 68 | double distanceTravelledByCar, double distanceTravelledByBicycle) { 69 | return (emissionPerKmBike * distanceTravelledByBike + 70 | emissionPerKmCar * distanceTravelledByCar + 71 | emissionPerKmBicycle * distanceTravelledByBicycle); 72 | } 73 | 74 | // Get the daily footprint of your food related activities 75 | static double getDailyFoodCarbonFootPrint( 76 | double meatCalorieIntake, 77 | double grainCalorieIntake, 78 | double dairyCalorieIntake, 79 | double fruitCalorieIntake, 80 | ) { 81 | return (meatCalorieIntake * emissionPerUnitCalorieOfMeat + 82 | grainCalorieIntake * emissionPerUnitCalorieOfGrain + 83 | dairyCalorieIntake * emissionPerUnitCalorieOfDairy + 84 | fruitCalorieIntake * emissionPerUnitCalorieOfFruit) / 1000; 85 | } 86 | 87 | // Get total carbon footprint according to daily activities 88 | static double getTotalCarbonFootPrint( 89 | // Household 90 | double hoursFanUsed, 91 | double hoursTVUsed, 92 | double hoursFridgeUsed, 93 | double litresOfWaterUsed, 94 | 95 | // Travel 96 | double distanceTravelledByBike, 97 | double distanceTravelledByCar, 98 | double distanceTravelledByBicycle, 99 | 100 | // Food 101 | double meatCalorieIntake, 102 | double grainCalorieIntake, 103 | double dairyCalorieIntake, 104 | double fruitCalorieIntake, 105 | ) { 106 | return (getDailyHouseHoldCarbonFootPrint( 107 | hoursFanUsed, hoursTVUsed, hoursFridgeUsed, litresOfWaterUsed) + 108 | getDailyTravelFootPrint(distanceTravelledByBike, distanceTravelledByCar, 109 | distanceTravelledByBicycle) + 110 | getDailyFoodCarbonFootPrint(meatCalorieIntake, grainCalorieIntake, 111 | dairyCalorieIntake, fruitCalorieIntake)); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /lib/screens/home/startScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:C1O2/helpers/colors.dart'; 2 | import 'package:C1O2/screens/calculator/user_inputs.dart'; 3 | import 'package:animated_text_kit/animated_text_kit.dart'; 4 | import 'package:flare_flutter/flare_actor.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | const TextStyle kTextStyle = TextStyle( 8 | fontSize: 24.0, 9 | color: ColorPallete.color3, 10 | shadows: [ 11 | Shadow( 12 | color: ColorPallete.color3, 13 | blurRadius: 3, 14 | offset: Offset( 15 | 0.9, 16 | 0.9, 17 | ), 18 | ), 19 | Shadow( 20 | color: ColorPallete.color3, 21 | blurRadius: 3, 22 | offset: Offset( 23 | 1.2, 24 | 1.2, 25 | ), 26 | ), 27 | ], 28 | ); 29 | 30 | class StartScreen extends StatelessWidget { 31 | static const String routeName = '/'; 32 | @override 33 | Widget build(BuildContext context) { 34 | return Scaffold( 35 | backgroundColor: ColorPallete.background, 36 | body: SafeArea( 37 | child: SingleChildScrollView( 38 | child: Column( 39 | crossAxisAlignment: CrossAxisAlignment.start, 40 | children: [ 41 | Container( 42 | height: 200, 43 | child: FlareActor( 44 | 'assets/flare/WorldSpin.flr', 45 | animation: 'roll', 46 | fit: BoxFit.contain, 47 | ), 48 | ), 49 | SizedBox( 50 | height: 20, 51 | ), 52 | Padding( 53 | padding: const EdgeInsets.symmetric( 54 | horizontal: 20, 55 | ), 56 | child: TypewriterAnimatedTextKit( 57 | totalRepeatCount: 3, 58 | speed: Duration(seconds: 1), 59 | text: ['Hey there !', 'Make a difference!', 'Start today!'], 60 | textStyle: kTextStyle.copyWith( 61 | fontFamily: "Orbitron", 62 | ), 63 | ), 64 | ), 65 | SizedBox( 66 | height: 10, 67 | ), 68 | Padding( 69 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 70 | child: Text( 71 | 'Know your share in world carbon footprint!', 72 | style: kTextStyle.copyWith( 73 | fontSize: 16, 74 | ), 75 | ), 76 | ), 77 | SizedBox( 78 | height: 16.0, 79 | ), 80 | CustomCard( 81 | 'Commute', 82 | 'assets/images/finalcar.png', 83 | 'travel', 84 | ), 85 | SizedBox( 86 | height: 8.0, 87 | ), 88 | CustomCard( 89 | 'Household', 90 | 'assets/images/finaltv.png', 91 | 'water', 92 | ), 93 | SizedBox( 94 | height: 8.0, 95 | ), 96 | CustomCard( 97 | 'Food', 98 | 'assets/images/Cooking-pana.png', 99 | 'food', 100 | ), 101 | SizedBox( 102 | height: 16.0, 103 | ), 104 | ], 105 | ), 106 | ), 107 | ), 108 | ); 109 | } 110 | } 111 | 112 | class CustomCard extends StatelessWidget { 113 | final String image; 114 | final String title; 115 | final String arg; 116 | final String routeName = UserInputs.routeName; 117 | 118 | CustomCard( 119 | this.title, 120 | this.image, 121 | this.arg, 122 | ); 123 | 124 | @override 125 | Widget build(BuildContext context) { 126 | return GestureDetector( 127 | onTap: () { 128 | Navigator.pushNamed( 129 | context, 130 | routeName, 131 | arguments: arg, 132 | ); 133 | }, 134 | child: Container( 135 | height: 150, 136 | margin: EdgeInsets.symmetric( 137 | horizontal: 10.0, 138 | ), 139 | decoration: BoxDecoration( 140 | borderRadius: BorderRadius.circular(20.0), 141 | color: ColorPallete.cardBackground, 142 | ), 143 | child: Row( 144 | crossAxisAlignment: CrossAxisAlignment.center, 145 | children: [ 146 | Padding( 147 | padding: const EdgeInsets.all(8.0), 148 | child: Image.asset( 149 | image, 150 | height: 130, 151 | ), 152 | ), 153 | SizedBox( 154 | width: 8, 155 | ), 156 | Flexible( 157 | child: Column( 158 | mainAxisAlignment: MainAxisAlignment.spaceAround, 159 | crossAxisAlignment: CrossAxisAlignment.start, 160 | mainAxisSize: MainAxisSize.max, 161 | children: [ 162 | Container( 163 | child: Text(title, 164 | style: kTextStyle.copyWith( 165 | fontSize: 26, 166 | fontWeight: FontWeight.w600, 167 | )), 168 | ), 169 | Container( 170 | child: Text( 171 | 'Calculate your carbon footprint.', 172 | style: TextStyle( 173 | color: ColorPallete.cardHeading, 174 | fontSize: 16, 175 | ), 176 | ), 177 | ), 178 | ], 179 | ), 180 | ), 181 | ], 182 | ), 183 | ), 184 | ); 185 | } 186 | } 187 | 188 | RichText myText = RichText( 189 | text: TextSpan( 190 | children: [ 191 | TextSpan( 192 | text: 'Hey there! ', 193 | style: kTextStyle.copyWith( 194 | fontFamily: "Orbitron", 195 | ), 196 | ), 197 | TextSpan( 198 | text: '👋', 199 | style: TextStyle(fontSize: 20), 200 | ), 201 | ], 202 | )); 203 | -------------------------------------------------------------------------------- /lib/screens/reduce/reduce_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:C1O2/helpers/colors.dart'; 2 | import 'package:C1O2/helpers/text_theme.dart'; 3 | import 'package:C1O2/screens/home/startScreen.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class ReduceEmissionScreen extends StatelessWidget { 7 | static final routeName = "/reduce-carbon-footprint"; 8 | 9 | List getWidgetTree() { 10 | List reduceCarbonFootPrintmsgs = [ 11 | { 12 | 'icon': Icons.hot_tub, 13 | 'title': 'Reduce emissions due to household activities', 14 | 'options': [ 15 | { 16 | 'icon': Icons.do_not_disturb_alt, 17 | 'message': 'Do not forget to switch off the lights or unplug your electronic devices when they are not in use', 18 | }, 19 | { 20 | 'icon': Icons.done_outline, 21 | 'message': 'Lower the amount of energy used to pump,treat and heat water by washing your car less often, using climate-appropriate plants in garden', 22 | }, 23 | { 24 | 'icon': Icons.do_not_disturb_alt, 25 | 'message': 'Don\'t set thermostat too high or low. Install a programmable model to turn off the heat or air conditioning when you\'re not at home', 26 | }, 27 | ] 28 | }, 29 | { 30 | 'icon': Icons.card_travel, 31 | 'title': 'Reduce emissions due to your commutes', 32 | 'options': [ 33 | { 34 | 'icon': Icons.do_not_disturb_alt, 35 | 'message': 'Do not unnecessarily speed up or accelerate,it increases the mileage upto 33%, waste gas, money and increases carbon emission', 36 | }, 37 | { 38 | 'icon': Icons.done_outline, 39 | 'message': 'When possible,walk or ride your bike in order to avoid carbon emission completely', 40 | }, 41 | { 42 | 'icon': Icons.do_not_disturb_alt, 43 | 'message': 'Don\'t buy a minivan or SUV if you don\'t need 4WD and/or will ocassionally need extra space', 44 | }, 45 | ] 46 | }, 47 | { 48 | 'icon': Icons.fastfood, 49 | 'title': 'Reduce emissions due to food activities', 50 | 'options': [ 51 | { 52 | 'icon': Icons.do_not_disturb_alt, 53 | 'message': 'Stop wasting food!', 54 | }, 55 | { 56 | 'icon': Icons.done_outline, 57 | 'message': 'Eat low on the food chain', 58 | }, 59 | { 60 | 'icon': Icons.do_not_disturb_alt, 61 | 'message': 'Don\'t eat excess calories!', 62 | }, 63 | ] 64 | }, 65 | ]; 66 | 67 | List parentWidgetTree = []; 68 | 69 | for (var reduceEmissionData in reduceCarbonFootPrintmsgs) { 70 | List widgetTree = []; 71 | 72 | widgetTree.add( 73 | SizedBox( 74 | height: 15, 75 | ), 76 | ); 77 | 78 | Widget cardHeader = ListTile( 79 | leading: Icon( 80 | reduceEmissionData['icon'], 81 | color: ColorPallete.color3, 82 | ), 83 | title: CoolText( 84 | reduceEmissionData['title'], 85 | fontSize: 17, 86 | ), 87 | ); 88 | 89 | widgetTree.add(cardHeader); 90 | 91 | List sectionDivider = [ 92 | SizedBox( 93 | height: 8, 94 | ), 95 | Padding( 96 | padding: const EdgeInsets.symmetric(horizontal: 20), 97 | child: Divider( 98 | thickness: 1, 99 | color: ColorPallete.color6, 100 | ), 101 | ), 102 | SizedBox( 103 | height: 5, 104 | ), 105 | ]; 106 | 107 | widgetTree = [...widgetTree, ...sectionDivider]; 108 | 109 | for (var option in reduceEmissionData['options']) { 110 | Widget optionWidget = ListTile( 111 | leading: Icon( 112 | option['icon'], 113 | color: ColorPallete.color3, 114 | ), 115 | title: Text( 116 | option['message'], 117 | style: TextStyle( 118 | color: ColorPallete.color3, 119 | ), 120 | ), 121 | ); 122 | 123 | widgetTree.add(optionWidget); 124 | } 125 | 126 | widgetTree.add( 127 | SizedBox( 128 | height: 10, 129 | ), 130 | ); 131 | 132 | Widget parentWidget = Container( 133 | padding: EdgeInsets.all(8), 134 | width: double.infinity, 135 | child: Card( 136 | shape: BeveledRectangleBorder( 137 | borderRadius: BorderRadius.circular(20), 138 | ), 139 | color: ColorPallete.cardBackground, 140 | child: Padding( 141 | padding: const EdgeInsets.all(8.0), 142 | child: Column( 143 | mainAxisAlignment: MainAxisAlignment.start, 144 | crossAxisAlignment: CrossAxisAlignment.start, 145 | children: widgetTree, 146 | ), 147 | ), 148 | ), 149 | ); 150 | 151 | parentWidgetTree.add(parentWidget); 152 | } 153 | 154 | return parentWidgetTree; 155 | } 156 | 157 | @override 158 | Widget build(BuildContext context) { 159 | return Scaffold( 160 | backgroundColor: ColorPallete.background, 161 | body: SingleChildScrollView( 162 | child: Column( 163 | children: [ 164 | // Container( 165 | // color: ColorPallete.cardBackground, 166 | // child: SizedBox( 167 | // height: MediaQuery.of(context).size.height / 6, 168 | // width: double.infinity, 169 | // child: Column( 170 | // mainAxisAlignment: MainAxisAlignment.center, 171 | // children: [ 172 | // Padding( 173 | // padding: const EdgeInsets.all(10), 174 | // child: CoolText( 175 | // "Reduce your carbon footprint", 176 | // fontSize: 18, 177 | // letterSpacing: 1.1, 178 | // ), 179 | // ), 180 | // ], 181 | // ), 182 | // ), 183 | // ), 184 | SizedBox( 185 | height: 30, 186 | ), 187 | ...getWidgetTree(), 188 | SizedBox( 189 | height: 100, 190 | ), 191 | ], 192 | ), 193 | ), 194 | floatingActionButtonLocation: FloatingActionButtonLocation.startFloat, 195 | floatingActionButton: FloatingActionButton.extended( 196 | shape: BeveledRectangleBorder( 197 | borderRadius: BorderRadius.circular(10), 198 | ), 199 | backgroundColor: ColorPallete.cardBackground.withBlue(150), 200 | onPressed: () { 201 | Navigator.pushNamed( 202 | context, 203 | StartScreen.routeName, 204 | ); 205 | }, 206 | label: Text( 207 | "Home", 208 | style: TextStyle( 209 | color: ColorPallete.color3, 210 | ), 211 | ), 212 | icon: Icon( 213 | Icons.home, 214 | color: ColorPallete.color3, 215 | ), 216 | ), 217 | ); 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | animated_text_kit: 5 | dependency: "direct main" 6 | description: 7 | name: animated_text_kit 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.2.0" 11 | archive: 12 | dependency: transitive 13 | description: 14 | name: archive 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.0.13" 18 | args: 19 | dependency: transitive 20 | description: 21 | name: args 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.6.0" 25 | async: 26 | dependency: transitive 27 | description: 28 | name: async 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.5.0-nullsafety.1" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.1.0-nullsafety.1" 39 | characters: 40 | dependency: transitive 41 | description: 42 | name: characters 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.0-nullsafety.3" 46 | charcode: 47 | dependency: transitive 48 | description: 49 | name: charcode 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.2.0-nullsafety.1" 53 | clock: 54 | dependency: transitive 55 | description: 56 | name: clock 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.0-nullsafety.1" 60 | collection: 61 | dependency: transitive 62 | description: 63 | name: collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.15.0-nullsafety.3" 67 | convert: 68 | dependency: transitive 69 | description: 70 | name: convert 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.1.1" 74 | crypto: 75 | dependency: transitive 76 | description: 77 | name: crypto 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "2.1.5" 81 | cupertino_icons: 82 | dependency: "direct main" 83 | description: 84 | name: cupertino_icons 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.1.3" 88 | fake_async: 89 | dependency: transitive 90 | description: 91 | name: fake_async 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.2.0-nullsafety.1" 95 | file: 96 | dependency: transitive 97 | description: 98 | name: file 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "5.2.1" 102 | flare_dart: 103 | dependency: transitive 104 | description: 105 | name: flare_dart 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "2.3.4" 109 | flare_flutter: 110 | dependency: "direct main" 111 | description: 112 | name: flare_flutter 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "2.0.4" 116 | flutter: 117 | dependency: "direct main" 118 | description: flutter 119 | source: sdk 120 | version: "0.0.0" 121 | flutter_launcher_icons: 122 | dependency: "direct main" 123 | description: 124 | name: flutter_launcher_icons 125 | url: "https://pub.dartlang.org" 126 | source: hosted 127 | version: "0.7.5" 128 | flutter_test: 129 | dependency: "direct dev" 130 | description: flutter 131 | source: sdk 132 | version: "0.0.0" 133 | flutter_xlider: 134 | dependency: "direct main" 135 | description: 136 | name: flutter_xlider 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "3.4.0" 140 | google_fonts: 141 | dependency: "direct main" 142 | description: 143 | name: google_fonts 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "1.1.0" 147 | http: 148 | dependency: transitive 149 | description: 150 | name: http 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "0.12.1" 154 | http_parser: 155 | dependency: transitive 156 | description: 157 | name: http_parser 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "3.1.4" 161 | image: 162 | dependency: transitive 163 | description: 164 | name: image 165 | url: "https://pub.dartlang.org" 166 | source: hosted 167 | version: "2.1.13" 168 | intl: 169 | dependency: transitive 170 | description: 171 | name: intl 172 | url: "https://pub.dartlang.org" 173 | source: hosted 174 | version: "0.16.1" 175 | matcher: 176 | dependency: transitive 177 | description: 178 | name: matcher 179 | url: "https://pub.dartlang.org" 180 | source: hosted 181 | version: "0.12.10-nullsafety.1" 182 | meta: 183 | dependency: transitive 184 | description: 185 | name: meta 186 | url: "https://pub.dartlang.org" 187 | source: hosted 188 | version: "1.3.0-nullsafety.3" 189 | nested: 190 | dependency: transitive 191 | description: 192 | name: nested 193 | url: "https://pub.dartlang.org" 194 | source: hosted 195 | version: "0.0.4" 196 | path: 197 | dependency: transitive 198 | description: 199 | name: path 200 | url: "https://pub.dartlang.org" 201 | source: hosted 202 | version: "1.8.0-nullsafety.1" 203 | path_provider: 204 | dependency: transitive 205 | description: 206 | name: path_provider 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "1.6.11" 210 | path_provider_linux: 211 | dependency: transitive 212 | description: 213 | name: path_provider_linux 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "0.0.1+1" 217 | path_provider_macos: 218 | dependency: transitive 219 | description: 220 | name: path_provider_macos 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "0.0.4+3" 224 | path_provider_platform_interface: 225 | dependency: transitive 226 | description: 227 | name: path_provider_platform_interface 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "1.0.2" 231 | pedantic: 232 | dependency: transitive 233 | description: 234 | name: pedantic 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "1.9.0" 238 | petitparser: 239 | dependency: transitive 240 | description: 241 | name: petitparser 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "3.0.4" 245 | platform: 246 | dependency: transitive 247 | description: 248 | name: platform 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "2.2.1" 252 | plugin_platform_interface: 253 | dependency: transitive 254 | description: 255 | name: plugin_platform_interface 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "1.0.2" 259 | process: 260 | dependency: transitive 261 | description: 262 | name: process 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "3.0.13" 266 | provider: 267 | dependency: "direct main" 268 | description: 269 | name: provider 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "4.1.3" 273 | sky_engine: 274 | dependency: transitive 275 | description: flutter 276 | source: sdk 277 | version: "0.0.99" 278 | source_span: 279 | dependency: transitive 280 | description: 281 | name: source_span 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "1.8.0-nullsafety.2" 285 | stack_trace: 286 | dependency: transitive 287 | description: 288 | name: stack_trace 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "1.10.0-nullsafety.1" 292 | stream_channel: 293 | dependency: transitive 294 | description: 295 | name: stream_channel 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "2.1.0-nullsafety.1" 299 | string_scanner: 300 | dependency: transitive 301 | description: 302 | name: string_scanner 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "1.1.0-nullsafety.1" 306 | term_glyph: 307 | dependency: transitive 308 | description: 309 | name: term_glyph 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "1.2.0-nullsafety.1" 313 | test_api: 314 | dependency: transitive 315 | description: 316 | name: test_api 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "0.2.19-nullsafety.2" 320 | typed_data: 321 | dependency: transitive 322 | description: 323 | name: typed_data 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "1.3.0-nullsafety.3" 327 | vector_math: 328 | dependency: transitive 329 | description: 330 | name: vector_math 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "2.1.0-nullsafety.3" 334 | xdg_directories: 335 | dependency: transitive 336 | description: 337 | name: xdg_directories 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "0.1.0" 341 | xml: 342 | dependency: transitive 343 | description: 344 | name: xml 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "3.7.0" 348 | yaml: 349 | dependency: transitive 350 | description: 351 | name: yaml 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "2.2.1" 355 | sdks: 356 | dart: ">=2.10.0-110 <2.11.0" 357 | flutter: ">=1.17.0 <2.0.0" 358 | -------------------------------------------------------------------------------- /lib/screens/result/result_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:C1O2/helpers/colors.dart'; 2 | import 'package:C1O2/helpers/text_theme.dart'; 3 | import 'package:C1O2/screens/reduce/reduce_screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_xlider/flutter_xlider.dart'; 6 | 7 | class ResultScreen extends StatelessWidget { 8 | final double userEmission; 9 | final double averageEmission; 10 | final String activityName; 11 | 12 | static final routeName = "/result"; 13 | 14 | ResultScreen( 15 | {Key key, this.activityName, this.userEmission, this.averageEmission}) 16 | : super(key: key); 17 | 18 | Text toolTipLabel = Text( 19 | " tonnes CO2", 20 | style: TextStyle( 21 | fontSize: 30, 22 | color: ColorPallete.color3, 23 | ), 24 | ); 25 | 26 | double roundOff(double value) { 27 | return double.parse(value.toStringAsFixed(2)); 28 | } 29 | 30 | // returns the percentage change between 31 | // the emission by user and average emission of that category 32 | double getChangePercentage() { 33 | double changePercent = 34 | ((userEmission - averageEmission) / averageEmission) * 100; 35 | 36 | changePercent = changePercent >= 0 ? changePercent : -changePercent; 37 | 38 | return roundOff(changePercent); 39 | } 40 | 41 | List getDataGrids(String changePrefix, double changePercent) { 42 | List emissionDatas = [ 43 | { 44 | 'text': 'Your carbon footprint for $activityName activities', 45 | 'figure': '${roundOff(userEmission)} tonnes CO2', 46 | 'icon': Icons.person_outline, 47 | }, 48 | { 49 | 'text': 'Average carbon footprint for $activityName', 50 | 'figure': '${roundOff(averageEmission)} tonnes CO2', 51 | 'icon': Icons.nature_people, 52 | }, 53 | { 54 | 'text': 'You are emitting $changePrefix emission than average', 55 | 'figure': '$changePercent %', 56 | 'icon': Icons.track_changes, 57 | }, 58 | ]; 59 | 60 | List widgetList = []; 61 | 62 | for (var emissionData in emissionDatas) { 63 | Widget listItem = Container( 64 | child: Card( 65 | elevation: 2, 66 | shape: BeveledRectangleBorder( 67 | borderRadius: BorderRadius.circular(12), 68 | ), 69 | color: ColorPallete.cardBackground, 70 | child: ListTile( 71 | title: CoolText( 72 | emissionData['figure'], 73 | fontSize: 18, 74 | letterSpacing: 1.1, 75 | ), 76 | subtitle: Padding( 77 | padding: const EdgeInsets.fromLTRB(0, 8, 0, 0), 78 | child: Text( 79 | emissionData['text'], 80 | style: TextStyle( 81 | color: ColorPallete.color7, 82 | fontSize: 13, 83 | letterSpacing: 0.7, 84 | ), 85 | ), 86 | ), 87 | trailing: Icon( 88 | emissionData['icon'], 89 | color: ColorPallete.color3, 90 | ), 91 | ), 92 | ), 93 | ); 94 | 95 | widgetList.add(listItem); 96 | } 97 | 98 | return widgetList; 99 | } 100 | 101 | @override 102 | Widget build(BuildContext context) { 103 | FlutterSliderHandler _leftHandler, _rightHandler; 104 | 105 | FlutterSliderHandler userHandler = FlutterSliderHandler( 106 | child: Material( 107 | type: MaterialType.canvas, 108 | shape: BeveledRectangleBorder( 109 | borderRadius: BorderRadius.circular(7), 110 | ), 111 | color: ColorPallete.color4, 112 | elevation: 3, 113 | child: Container( 114 | padding: EdgeInsets.all(5), 115 | child: Icon( 116 | Icons.person, 117 | size: 25, 118 | color: ColorPallete.color3, 119 | ), 120 | ), 121 | ), 122 | ); 123 | 124 | FlutterSliderHandler avgHandler = FlutterSliderHandler( 125 | child: Material( 126 | shape: BeveledRectangleBorder( 127 | borderRadius: BorderRadius.circular(7), 128 | ), 129 | // type: MaterialType.canvas, 130 | color: ColorPallete.color3, 131 | shadowColor: ColorPallete.cardBackground, 132 | elevation: 3, 133 | child: Container( 134 | padding: EdgeInsets.all(5), 135 | child: Icon( 136 | Icons.nature_people, 137 | size: 25, 138 | color: ColorPallete.color4, 139 | ), 140 | ), 141 | ), 142 | ); 143 | 144 | List _values = [roundOff(userEmission), roundOff(averageEmission)]; 145 | Color _trackBarColor = Colors.greenAccent; 146 | _leftHandler = userHandler; 147 | _rightHandler = avgHandler; 148 | String _changePercentageSuffix = "less"; 149 | 150 | double changePercent = getChangePercentage(); 151 | 152 | if (userEmission > averageEmission) { 153 | _values = [roundOff(averageEmission), roundOff(userEmission)]; 154 | _trackBarColor = Colors.red; 155 | _leftHandler = avgHandler; 156 | _rightHandler = userHandler; 157 | _changePercentageSuffix = "more"; 158 | } 159 | 160 | return SafeArea( 161 | child: Scaffold( 162 | appBar: AppBar( 163 | backgroundColor: ColorPallete.cardBackground, 164 | automaticallyImplyLeading: false, 165 | leading: IconButton( 166 | icon: Icon(Icons.arrow_back), 167 | onPressed: () { 168 | Navigator.of(context).pop(); 169 | }, 170 | color: ColorPallete.color7, 171 | ), 172 | title: Text( 173 | "$activityName carbon footprint", 174 | style: TextStyle( 175 | fontWeight: FontWeight.w300, 176 | fontSize: 16, 177 | color: ColorPallete.color7), 178 | ), 179 | ), 180 | backgroundColor: ColorPallete.background, 181 | body: SingleChildScrollView( 182 | child: Container( 183 | child: Column( 184 | children: [ 185 | Container( 186 | color: ColorPallete.cardBackground, 187 | child: SizedBox( 188 | child: Container( 189 | child: Column( 190 | mainAxisAlignment: MainAxisAlignment.center, 191 | children: [ 192 | CoolText( 193 | "${roundOff(userEmission)} tonnes CO2", 194 | fontSize: 22, 195 | letterSpacing: 1.1, 196 | ), 197 | SizedBox( 198 | height: 15, 199 | ), 200 | Text( 201 | "Your carbon footprint is $changePercent% $_changePercentageSuffix than an average person", 202 | textAlign: TextAlign.center, 203 | style: TextStyle( 204 | color: ColorPallete.color7, 205 | fontWeight: FontWeight.w400, 206 | fontSize: 16, 207 | ), 208 | ), 209 | ], 210 | ), 211 | ), 212 | height: MediaQuery.of(context).size.height / 3, 213 | width: double.infinity, 214 | ), 215 | ), 216 | SingleChildScrollView( 217 | padding: EdgeInsets.all(8), 218 | child: Column( 219 | children: [ 220 | Card( 221 | elevation: 2, 222 | shape: BeveledRectangleBorder( 223 | borderRadius: BorderRadius.circular(8), 224 | ), 225 | color: ColorPallete.cardBackground, 226 | child: Container( 227 | padding: EdgeInsets.symmetric(vertical: 10), 228 | child: FlutterSlider( 229 | step: FlutterSliderStep(step: 0.01), 230 | values: _values, 231 | rangeSlider: true, 232 | disabled: true, 233 | min: 0, 234 | // Set a max limit according to the highest value between `userEmission` & `avgEmission` 235 | max: _values[1] + _values[1] / 10, 236 | trackBar: FlutterSliderTrackBar( 237 | activeDisabledTrackBarColor: _trackBarColor, 238 | inactiveDisabledTrackBarColor: 239 | ColorPallete.color6), 240 | handler: _leftHandler, 241 | rightHandler: _rightHandler, 242 | tooltip: FlutterSliderTooltip( 243 | positionOffset: 244 | FlutterSliderTooltipPositionOffset(top: -5), 245 | boxStyle: FlutterSliderTooltipBox( 246 | decoration: BoxDecoration( 247 | color: ColorPallete.cardBackground, 248 | ), 249 | ), 250 | alwaysShowTooltip: true, 251 | textStyle: TextStyle( 252 | fontSize: 60, 253 | color: Colors.white, 254 | ), 255 | leftSuffix: toolTipLabel, 256 | rightSuffix: toolTipLabel, 257 | ), 258 | ), 259 | ), 260 | ), 261 | ...getDataGrids( 262 | _changePercentageSuffix, 263 | changePercent, 264 | ), 265 | SizedBox( 266 | height: 10, 267 | ), 268 | Divider( 269 | thickness: 0.7, 270 | color: ColorPallete.color6, 271 | ), 272 | SizedBox( 273 | height: 10, 274 | ), 275 | Card( 276 | color: ColorPallete.cardBackground, 277 | shape: BeveledRectangleBorder( 278 | borderRadius: BorderRadius.circular(10), 279 | ), 280 | child: ListTile( 281 | onTap: () { 282 | Navigator.pushNamed( 283 | context, ReduceEmissionScreen.routeName); 284 | }, 285 | title: CoolText( 286 | "Reduce carbon emissions", 287 | fontSize: 18, 288 | letterSpacing: 1.1, 289 | ), 290 | subtitle: Padding( 291 | padding: const EdgeInsets.fromLTRB(0, 8, 0, 0), 292 | child: Text( 293 | "Our earth needs it. Let's move together in this.", 294 | style: TextStyle( 295 | color: ColorPallete.color7, 296 | fontSize: 13, 297 | letterSpacing: 0.7, 298 | ), 299 | ), 300 | ), 301 | trailing: Icon( 302 | Icons.nature, 303 | color: ColorPallete.color3, 304 | ), 305 | ), 306 | ), 307 | ], 308 | ), 309 | ), 310 | ], 311 | ), 312 | ), 313 | ), 314 | ), 315 | ); 316 | } 317 | } 318 | -------------------------------------------------------------------------------- /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 = 8.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 | FRAMEWORK_SEARCH_PATHS = ( 293 | "$(inherited)", 294 | "$(PROJECT_DIR)/Flutter", 295 | ); 296 | INFOPLIST_FILE = Runner/Info.plist; 297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 298 | LIBRARY_SEARCH_PATHS = ( 299 | "$(inherited)", 300 | "$(PROJECT_DIR)/Flutter", 301 | ); 302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.C1O2; 303 | PRODUCT_NAME = "$(TARGET_NAME)"; 304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 305 | SWIFT_VERSION = 5.0; 306 | VERSIONING_SYSTEM = "apple-generic"; 307 | }; 308 | name = Profile; 309 | }; 310 | 97C147031CF9000F007C117D /* Debug */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ALWAYS_SEARCH_USER_PATHS = NO; 314 | CLANG_ANALYZER_NONNULL = YES; 315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 316 | CLANG_CXX_LIBRARY = "libc++"; 317 | CLANG_ENABLE_MODULES = YES; 318 | CLANG_ENABLE_OBJC_ARC = YES; 319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 320 | CLANG_WARN_BOOL_CONVERSION = YES; 321 | CLANG_WARN_COMMA = YES; 322 | CLANG_WARN_CONSTANT_CONVERSION = YES; 323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_EMPTY_BODY = YES; 326 | CLANG_WARN_ENUM_CONVERSION = YES; 327 | CLANG_WARN_INFINITE_RECURSION = YES; 328 | CLANG_WARN_INT_CONVERSION = YES; 329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 334 | CLANG_WARN_STRICT_PROTOTYPES = YES; 335 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 336 | CLANG_WARN_UNREACHABLE_CODE = YES; 337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 339 | COPY_PHASE_STRIP = NO; 340 | DEBUG_INFORMATION_FORMAT = dwarf; 341 | ENABLE_STRICT_OBJC_MSGSEND = YES; 342 | ENABLE_TESTABILITY = YES; 343 | GCC_C_LANGUAGE_STANDARD = gnu99; 344 | GCC_DYNAMIC_NO_PIC = NO; 345 | GCC_NO_COMMON_BLOCKS = YES; 346 | GCC_OPTIMIZATION_LEVEL = 0; 347 | GCC_PREPROCESSOR_DEFINITIONS = ( 348 | "DEBUG=1", 349 | "$(inherited)", 350 | ); 351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 353 | GCC_WARN_UNDECLARED_SELECTOR = YES; 354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 355 | GCC_WARN_UNUSED_FUNCTION = YES; 356 | GCC_WARN_UNUSED_VARIABLE = YES; 357 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 358 | MTL_ENABLE_DEBUG_INFO = YES; 359 | ONLY_ACTIVE_ARCH = YES; 360 | SDKROOT = iphoneos; 361 | TARGETED_DEVICE_FAMILY = "1,2"; 362 | }; 363 | name = Debug; 364 | }; 365 | 97C147041CF9000F007C117D /* Release */ = { 366 | isa = XCBuildConfiguration; 367 | buildSettings = { 368 | ALWAYS_SEARCH_USER_PATHS = NO; 369 | CLANG_ANALYZER_NONNULL = YES; 370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 371 | CLANG_CXX_LIBRARY = "libc++"; 372 | CLANG_ENABLE_MODULES = YES; 373 | CLANG_ENABLE_OBJC_ARC = YES; 374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 375 | CLANG_WARN_BOOL_CONVERSION = YES; 376 | CLANG_WARN_COMMA = YES; 377 | CLANG_WARN_CONSTANT_CONVERSION = YES; 378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_EMPTY_BODY = YES; 381 | CLANG_WARN_ENUM_CONVERSION = YES; 382 | CLANG_WARN_INFINITE_RECURSION = YES; 383 | CLANG_WARN_INT_CONVERSION = YES; 384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 389 | CLANG_WARN_STRICT_PROTOTYPES = YES; 390 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 391 | CLANG_WARN_UNREACHABLE_CODE = YES; 392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 394 | COPY_PHASE_STRIP = NO; 395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 396 | ENABLE_NS_ASSERTIONS = NO; 397 | ENABLE_STRICT_OBJC_MSGSEND = YES; 398 | GCC_C_LANGUAGE_STANDARD = gnu99; 399 | GCC_NO_COMMON_BLOCKS = YES; 400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 402 | GCC_WARN_UNDECLARED_SELECTOR = YES; 403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 404 | GCC_WARN_UNUSED_FUNCTION = YES; 405 | GCC_WARN_UNUSED_VARIABLE = YES; 406 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 407 | MTL_ENABLE_DEBUG_INFO = NO; 408 | SDKROOT = iphoneos; 409 | SUPPORTED_PLATFORMS = iphoneos; 410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 411 | TARGETED_DEVICE_FAMILY = "1,2"; 412 | VALIDATE_PRODUCT = YES; 413 | }; 414 | name = Release; 415 | }; 416 | 97C147061CF9000F007C117D /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 419 | buildSettings = { 420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 421 | CLANG_ENABLE_MODULES = YES; 422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 423 | ENABLE_BITCODE = NO; 424 | FRAMEWORK_SEARCH_PATHS = ( 425 | "$(inherited)", 426 | "$(PROJECT_DIR)/Flutter", 427 | ); 428 | INFOPLIST_FILE = Runner/Info.plist; 429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 430 | LIBRARY_SEARCH_PATHS = ( 431 | "$(inherited)", 432 | "$(PROJECT_DIR)/Flutter", 433 | ); 434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.C1O2; 435 | PRODUCT_NAME = "$(TARGET_NAME)"; 436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 438 | SWIFT_VERSION = 5.0; 439 | VERSIONING_SYSTEM = "apple-generic"; 440 | }; 441 | name = Debug; 442 | }; 443 | 97C147071CF9000F007C117D /* Release */ = { 444 | isa = XCBuildConfiguration; 445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 446 | buildSettings = { 447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 448 | CLANG_ENABLE_MODULES = YES; 449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 450 | ENABLE_BITCODE = NO; 451 | FRAMEWORK_SEARCH_PATHS = ( 452 | "$(inherited)", 453 | "$(PROJECT_DIR)/Flutter", 454 | ); 455 | INFOPLIST_FILE = Runner/Info.plist; 456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 457 | LIBRARY_SEARCH_PATHS = ( 458 | "$(inherited)", 459 | "$(PROJECT_DIR)/Flutter", 460 | ); 461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.C1O2; 462 | PRODUCT_NAME = "$(TARGET_NAME)"; 463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 464 | SWIFT_VERSION = 5.0; 465 | VERSIONING_SYSTEM = "apple-generic"; 466 | }; 467 | name = Release; 468 | }; 469 | /* End XCBuildConfiguration section */ 470 | 471 | /* Begin XCConfigurationList section */ 472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 473 | isa = XCConfigurationList; 474 | buildConfigurations = ( 475 | 97C147031CF9000F007C117D /* Debug */, 476 | 97C147041CF9000F007C117D /* Release */, 477 | 249021D3217E4FDB00AE95B9 /* Profile */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 483 | isa = XCConfigurationList; 484 | buildConfigurations = ( 485 | 97C147061CF9000F007C117D /* Debug */, 486 | 97C147071CF9000F007C117D /* Release */, 487 | 249021D4217E4FDB00AE95B9 /* Profile */, 488 | ); 489 | defaultConfigurationIsVisible = 0; 490 | defaultConfigurationName = Release; 491 | }; 492 | /* End XCConfigurationList section */ 493 | }; 494 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 495 | } 496 | -------------------------------------------------------------------------------- /lib/screens/calculator/user_inputs.dart: -------------------------------------------------------------------------------- 1 | import 'package:C1O2/helpers/helpers.dart'; 2 | import 'package:flare_flutter/flare_actor.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | import 'package:flare_dart/actor.dart'; 6 | 7 | import '../result/result_screen.dart'; 8 | import './user_input_questions.dart'; 9 | import '../../helpers/colors.dart'; 10 | 11 | class UserInputs extends StatefulWidget { 12 | static const routeName = '/user-inputs'; 13 | @override 14 | _UserInputsState createState() => _UserInputsState(); 15 | } 16 | 17 | class _UserInputsState extends State { 18 | List answers = []; 19 | 20 | var index = 0; 21 | 22 | final _answerController = TextEditingController(); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | var args = ModalRoute.of(context).settings.arguments as String; 27 | final size = MediaQuery.of(context).size; 28 | 29 | List foodQ = Provider.of(context).foodQuestions; 30 | List travelQ = Provider.of(context).travelQuestions; 31 | List waterQ = Provider.of(context).waterQuestions; 32 | 33 | List questions = []; 34 | 35 | // print(args); 36 | 37 | if (args == 'food') { 38 | questions = foodQ; 39 | } else if (args == 'travel') { 40 | questions = travelQ; 41 | } else { 42 | questions = waterQ; 43 | } 44 | 45 | return Scaffold( 46 | body: SingleChildScrollView( 47 | child: Container( 48 | height: size.height, 49 | child: args == 'food' 50 | ? Stack( 51 | children: [ 52 | Container( 53 | color: ColorPallete.background, 54 | ), 55 | Positioned( 56 | child: FlareActor( 57 | 'assets/flare/base_two_flow.flr', 58 | animation: 'flow', 59 | fit: BoxFit.cover, 60 | color: ColorPallete.background, 61 | ), 62 | ), 63 | if (index == 0 || index == 1) 64 | Align( 65 | alignment: Alignment.bottomCenter, 66 | child: FlareActor( 67 | 'assets/flare/food_1.flr', 68 | animation: 'flow', 69 | fit: BoxFit.fitWidth, 70 | ), 71 | ), 72 | if (index == 2 || index == 3) 73 | Padding( 74 | padding: const EdgeInsets.all(30.0), 75 | child: Image.asset( 76 | 'assets/images/eat_1.png', 77 | ), 78 | ), 79 | Positioned( 80 | top: 150, 81 | child: Container( 82 | height: size.height, 83 | width: size.width, 84 | //decoration: BoxDecoration(color: ColorPallete.background), 85 | child: Column( 86 | mainAxisSize: MainAxisSize.min, 87 | mainAxisAlignment: MainAxisAlignment.center, 88 | crossAxisAlignment: CrossAxisAlignment.center, 89 | children: [ 90 | Align( 91 | child: Padding( 92 | padding: const EdgeInsets.symmetric( 93 | horizontal: 40.0, 94 | ), 95 | child: Text( 96 | questions[index], 97 | textAlign: TextAlign.center, 98 | style: TextStyle( 99 | color: ColorPallete.color3, 100 | fontSize: 20, 101 | ), 102 | ), 103 | ), 104 | ), 105 | SizedBox( 106 | height: 50, 107 | ), 108 | Align( 109 | child: Container( 110 | width: size.width * 0.4, 111 | child: TextFormField( 112 | controller: _answerController, 113 | decoration: InputDecoration( 114 | hintText: '(In Grams)', 115 | hintStyle: 116 | TextStyle(color: ColorPallete.color4), 117 | suffixIcon: IconButton( 118 | icon: Icon( 119 | Icons.trending_flat, 120 | color: ColorPallete.color3, 121 | ), 122 | onPressed: () { 123 | if (_answerController.text == '' || 124 | _answerController is String) { 125 | return; 126 | } 127 | answers.add(double.parse( 128 | _answerController.text)); 129 | if (index == questions.length - 1) { 130 | // print(answers); 131 | 132 | double footprint = CarbonFootPrint 133 | .getDailyFoodCarbonFootPrint( 134 | answers[0], 135 | answers[1], 136 | answers[2], 137 | answers[3]); 138 | 139 | Navigator.pushReplacement( 140 | context, 141 | MaterialPageRoute( 142 | builder: (context) => 143 | ResultScreen( 144 | userEmission: footprint, 145 | averageEmission: 146 | CarbonFootPrint 147 | .avgEmissionDueToFoodPerDay, 148 | activityName: "Food", 149 | ))); 150 | } else { 151 | index++; 152 | } 153 | _answerController.text = ''; 154 | setState(() {}); 155 | }, 156 | ), 157 | alignLabelWithHint: true, 158 | contentPadding: EdgeInsets.symmetric( 159 | horizontal: 10, 160 | vertical: 2, 161 | ), 162 | ), 163 | textAlign: TextAlign.center, 164 | keyboardType: TextInputType.number, 165 | style: TextStyle( 166 | color: ColorPallete.color3, 167 | ), 168 | ), 169 | ), 170 | ), 171 | ], 172 | ), 173 | ), 174 | ), 175 | ], 176 | ) 177 | : args == 'travel' 178 | ? Stack( 179 | children: [ 180 | Container( 181 | color: ColorPallete.background, 182 | ), 183 | Positioned( 184 | child: FlareActor( 185 | 'assets/flare/base_one.flr', 186 | animation: 'Flow', 187 | fit: BoxFit.cover, 188 | ), 189 | ), 190 | if (index == 0 || index == 2) 191 | FlareActor( 192 | 'assets/flare/bicycle_flow.flr', 193 | animation: 'flow', 194 | alignment: Alignment.bottomCenter, 195 | ), 196 | if (index == 1) 197 | Align( 198 | alignment: Alignment.bottomRight, 199 | child: Container( 200 | height: size.height * 0.3, 201 | child: Image.asset( 202 | 'assets/images/car.png', 203 | fit: BoxFit.cover, 204 | ), 205 | ), 206 | ), 207 | Positioned( 208 | child: Container( 209 | height: size.height, 210 | width: size.width, 211 | //decoration: BoxDecoration(color: ColorPallete.background), 212 | child: Column( 213 | mainAxisSize: MainAxisSize.min, 214 | mainAxisAlignment: MainAxisAlignment.center, 215 | crossAxisAlignment: CrossAxisAlignment.center, 216 | children: [ 217 | Align( 218 | child: Padding( 219 | padding: const EdgeInsets.symmetric( 220 | horizontal: 40.0), 221 | child: Text( 222 | questions[index], 223 | textAlign: TextAlign.center, 224 | style: TextStyle( 225 | color: ColorPallete.color3, 226 | fontSize: 20, 227 | ), 228 | ), 229 | ), 230 | ), 231 | SizedBox( 232 | height: 50, 233 | ), 234 | Align( 235 | child: Container( 236 | width: size.width * 0.4, 237 | child: TextFormField( 238 | controller: _answerController, 239 | decoration: InputDecoration( 240 | hintText: '(In miles)', 241 | hintStyle: TextStyle( 242 | color: ColorPallete.color4), 243 | //enabledBorder: InputBorder.none, 244 | //filled: true, 245 | //fillColor: ColorPallete.background.withBlue(-200), 246 | suffixIcon: IconButton( 247 | icon: Icon( 248 | Icons.trending_flat, 249 | color: ColorPallete.color3, 250 | ), 251 | onPressed: () { 252 | if (_answerController.text == '' || 253 | _answerController is String) { 254 | return; 255 | } 256 | answers.add(double.parse( 257 | _answerController.text)); 258 | 259 | if (index == questions.length - 1) { 260 | // print(answers); 261 | 262 | double footprint = CarbonFootPrint 263 | .getDailyTravelFootPrint( 264 | answers[0], 265 | answers[1], 266 | answers[2]); 267 | 268 | Navigator.pushReplacement( 269 | context, 270 | MaterialPageRoute( 271 | builder: (context) => 272 | ResultScreen( 273 | userEmission: 274 | footprint, 275 | averageEmission: 276 | CarbonFootPrint 277 | .avgEmissionDueToTravelPerDay, 278 | activityName: 279 | "Travel", 280 | ))); 281 | } else { 282 | index++; 283 | } 284 | _answerController.text = ''; 285 | setState(() {}); 286 | }, 287 | ), 288 | alignLabelWithHint: true, 289 | contentPadding: EdgeInsets.symmetric( 290 | horizontal: 10, 291 | vertical: 2, 292 | ), 293 | ), 294 | textAlign: TextAlign.center, 295 | keyboardType: TextInputType.number, 296 | style: TextStyle( 297 | color: ColorPallete.color3, 298 | ), 299 | ), 300 | ), 301 | ), 302 | ], 303 | ), 304 | ), 305 | ), 306 | ], 307 | ) 308 | : Stack( 309 | children: [ 310 | Container( 311 | color: ColorPallete.background, 312 | ), 313 | Positioned( 314 | child: FlareActor( 315 | 'assets/flare/base_water.flr', 316 | animation: 'island01', 317 | fit: BoxFit.cover, 318 | ), 319 | ), 320 | if (index == 0 || index == 1 || index == 2) 321 | FlareActor( 322 | 'assets/flare/watch_tv.flr', 323 | animation: 'flow', 324 | alignment: Alignment.bottomCenter, 325 | ), 326 | if (index == 3) 327 | FlareActor( 328 | 'assets/flare/water_flow.flr', 329 | animation: 'flow', 330 | alignment: Alignment.bottomRight, 331 | fit: BoxFit.fitWidth, 332 | ), 333 | Positioned( 334 | child: Container( 335 | height: size.height, 336 | width: size.width, 337 | //decoration: BoxDecoration(color: ColorPallete.background), 338 | child: Column( 339 | mainAxisSize: MainAxisSize.min, 340 | mainAxisAlignment: MainAxisAlignment.center, 341 | crossAxisAlignment: CrossAxisAlignment.center, 342 | children: [ 343 | Align( 344 | child: Padding( 345 | padding: const EdgeInsets.symmetric( 346 | horizontal: 40.0), 347 | child: Text( 348 | questions[index], 349 | textAlign: TextAlign.center, 350 | style: TextStyle( 351 | color: ColorPallete.color3, 352 | fontSize: 20, 353 | ), 354 | ), 355 | ), 356 | ), 357 | SizedBox( 358 | height: 50, 359 | ), 360 | Align( 361 | child: Container( 362 | width: size.width * 0.4, 363 | child: TextFormField( 364 | controller: _answerController, 365 | decoration: InputDecoration( 366 | hintText: index == 3 ? '' : '(In Hrs)', 367 | hintStyle: TextStyle( 368 | color: ColorPallete.color4), 369 | //enabledBorder: InputBorder.none, 370 | //filled: true, 371 | //fillColor: ColorPallete.background.withBlue(-200), 372 | suffixIcon: IconButton( 373 | icon: Icon( 374 | Icons.trending_flat, 375 | color: ColorPallete.color3, 376 | ), 377 | onPressed: () { 378 | if (_answerController.text == '' || 379 | _answerController is String) { 380 | return; 381 | } 382 | answers.add(double.parse( 383 | _answerController.text)); 384 | 385 | if (index == questions.length - 1) { 386 | // print(answers); 387 | 388 | double footprint = CarbonFootPrint 389 | .getDailyHouseHoldCarbonFootPrint( 390 | answers[0], 391 | answers[1], 392 | answers[2], 393 | answers[3]); 394 | 395 | Navigator.pushReplacement( 396 | context, 397 | MaterialPageRoute( 398 | builder: (context) => 399 | ResultScreen( 400 | userEmission: footprint, 401 | averageEmission: CarbonFootPrint 402 | .avgEmissionDueToHouseHoldPerDay, 403 | activityName: "HouseHold", 404 | ), 405 | ), 406 | ); 407 | } else { 408 | index++; 409 | } 410 | _answerController.text = ''; 411 | setState(() {}); 412 | }, 413 | ), 414 | alignLabelWithHint: true, 415 | contentPadding: EdgeInsets.symmetric( 416 | horizontal: 10, 417 | vertical: 2, 418 | ), 419 | ), 420 | textAlign: TextAlign.center, 421 | keyboardType: TextInputType.number, 422 | style: TextStyle( 423 | color: ColorPallete.color3, 424 | ), 425 | ), 426 | ), 427 | ), 428 | ], 429 | ), 430 | ), 431 | ), 432 | ], 433 | ), 434 | ), 435 | ), 436 | ); 437 | } 438 | } 439 | --------------------------------------------------------------------------------