├── 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