├── 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
├── android
├── app
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ └── values
│ │ │ │ │ └── styles.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── coronavirus_covid19_tracker
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── .classpath
│ ├── .project
│ └── build.gradle
├── gradle.properties
├── .gitignore
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── .project
├── settings.gradle
└── build.gradle
├── assets
├── icons
│ ├── count.png
│ ├── death.png
│ ├── fever.png
│ ├── patient.png
│ ├── suspect.png
│ ├── app_icon.png
│ ├── 2.0x
│ │ ├── count.png
│ │ ├── death.png
│ │ ├── fever.png
│ │ ├── patient.png
│ │ └── suspect.png
│ ├── 3.0x
│ │ ├── count.png
│ │ ├── death.png
│ │ ├── fever.png
│ │ ├── patient.png
│ │ └── suspect.png
│ ├── img_deaths_marker1.png
│ ├── img_deaths_marker2.png
│ └── img_deaths_marker3.png
└── map_styles
│ └── style.json
├── .vscode
└── settings.json
├── .metadata
├── rest_api
└── mathdroid_covid19_api.http
├── .gitignore
├── lib
├── app
│ ├── models
│ │ ├── covid19.g.dart
│ │ └── covid19.dart
│ ├── services
│ │ ├── api.dart
│ │ └── api_service.dart
│ ├── screens
│ │ ├── widgets
│ │ │ ├── lastupdated_status_text.dart
│ │ │ ├── chart.dart
│ │ │ ├── alert_dialog.dart
│ │ │ ├── global_stats_card.dart
│ │ │ ├── bottom_sheet.dart
│ │ │ └── country_card.dart
│ │ ├── daily_update.dart
│ │ ├── map.dart
│ │ └── dashboard.dart
│ ├── utils
│ │ └── app_utils.dart
│ └── repositories
│ │ └── data_repository.dart
└── main.dart
├── LICENSE
├── test
└── widget_test.dart
├── README.md
├── pubspec.yaml
└── pubspec.lock
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/android/app/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=..
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/assets/icons/count.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/count.png
--------------------------------------------------------------------------------
/assets/icons/death.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/death.png
--------------------------------------------------------------------------------
/assets/icons/fever.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/fever.png
--------------------------------------------------------------------------------
/assets/icons/patient.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/patient.png
--------------------------------------------------------------------------------
/assets/icons/suspect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/suspect.png
--------------------------------------------------------------------------------
/assets/icons/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/app_icon.png
--------------------------------------------------------------------------------
/assets/icons/2.0x/count.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/2.0x/count.png
--------------------------------------------------------------------------------
/assets/icons/2.0x/death.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/2.0x/death.png
--------------------------------------------------------------------------------
/assets/icons/2.0x/fever.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/2.0x/fever.png
--------------------------------------------------------------------------------
/assets/icons/2.0x/patient.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/2.0x/patient.png
--------------------------------------------------------------------------------
/assets/icons/2.0x/suspect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/2.0x/suspect.png
--------------------------------------------------------------------------------
/assets/icons/3.0x/count.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/3.0x/count.png
--------------------------------------------------------------------------------
/assets/icons/3.0x/death.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/3.0x/death.png
--------------------------------------------------------------------------------
/assets/icons/3.0x/fever.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/3.0x/fever.png
--------------------------------------------------------------------------------
/assets/icons/3.0x/patient.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/3.0x/patient.png
--------------------------------------------------------------------------------
/assets/icons/3.0x/suspect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/3.0x/suspect.png
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/assets/icons/img_deaths_marker1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/img_deaths_marker1.png
--------------------------------------------------------------------------------
/assets/icons/img_deaths_marker2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/img_deaths_marker2.png
--------------------------------------------------------------------------------
/assets/icons/img_deaths_marker3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/assets/icons/img_deaths_marker3.png
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "rest-client.environmentVariables": {
3 | "sandbox": {
4 | "baseUrl": "https://covid19.mathdro.id/api/"
5 | },
6 | "production": {
7 |
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/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/AbdullahChauhan/Coronavirus-COVID-19-Tracker/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/coronavirus_covid19_tracker/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.coronavirus_covid19_tracker
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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: 981afe39ae3de8d779466aca0d8af752b7323538
8 | channel: master
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/android/app/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | arguments=
2 | auto.sync=false
3 | build.scans.enabled=false
4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5 | connection.project.dir=
6 | eclipse.preferences.version=1
7 | gradle.user.home=
8 | java.home=C\:/Program Files/Android/Android Studio/jre
9 | jvm.arguments=
10 | offline.mode=false
11 | override.workspace.settings=true
12 | show.console.view=true
13 | show.executions.view=true
14 |
--------------------------------------------------------------------------------
/rest_api/mathdroid_covid19_api.http:
--------------------------------------------------------------------------------
1 | GET {{baseUrl}}
2 | Accept: application/json
3 |
4 | ###
5 |
6 | GET {{baseUrl}}/daily
7 | Accept: application/json
8 |
9 | ###
10 |
11 | GET {{baseUrl}}/confirmed
12 | Accept: application/json
13 |
14 | ###
15 |
16 | GET {{baseUrl}}/recovered
17 | Accept: application/json
18 |
19 | ###
20 |
21 | GET {{baseUrl}}/deaths
22 | Accept: application/json
23 |
24 | ###
25 |
26 | GET {{baseUrl}}/countries
27 | Accept: application/json
28 |
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 | import GoogleMaps
4 |
5 | @UIApplicationMain
6 | @objc class AppDelegate: FlutterAppDelegate {
7 | override func application(
8 | _ application: UIApplication,
9 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
10 | ) -> Bool {
11 | GMSServices.provideAPIKey("YOUR KEY HERE")
12 | GeneratedPluginRegistrant.register(with: self)
13 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/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/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | /build/
32 |
33 | # Web related
34 | lib/generated_plugin_registrant.dart
35 |
36 | # Symbolication related
37 | app.*.symbols
38 |
39 | # Obfuscation related
40 | app.*.map.json
41 |
42 | # Exceptions to above rules.
43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
44 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/app/models/covid19.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'covid19.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | Covid19 _$Covid19FromJson(Map json) {
10 | return Covid19(
11 | confirmed: json['confirmed'] as Map,
12 | recovered: json['recovered'] as Map,
13 | deaths: json['deaths'] as Map,
14 | lastUpdate: json['lastUpdate'] == null
15 | ? null
16 | : DateTime.parse(json['lastUpdate'] as String),
17 | );
18 | }
19 |
20 | Map _$Covid19ToJson(Covid19 instance) => {
21 | 'confirmed': instance.confirmed,
22 | 'recovered': instance.recovered,
23 | 'deaths': instance.deaths,
24 | 'lastUpdate': instance.lastUpdate?.toIso8601String(),
25 | };
26 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/lib/app/services/api.dart:
--------------------------------------------------------------------------------
1 | enum Endpoint {
2 | confirmed,
3 | recovered,
4 | deaths,
5 | daily,
6 | countries
7 | }
8 |
9 | class API {
10 | static final String host = "covid19.mathdro.id";
11 | static final String basePath = "api";
12 |
13 | Uri apiCallUri() => Uri(
14 | scheme: "https",
15 | host: host,
16 | path: basePath,
17 | );
18 |
19 | Uri endpointUri(Endpoint endpoint) => Uri(
20 | scheme: "https",
21 | host: host,
22 | path: '$basePath/${_paths[endpoint]}'
23 | );
24 |
25 | Uri endpointUriForCountry(Endpoint endpoint, String country) => Uri(
26 | scheme: "https",
27 | host: host,
28 | path: '$basePath/${_paths[endpoint]}/$country'
29 | );
30 |
31 | Uri endpointUriForAllCountries(Endpoint endpoint) => Uri(
32 | scheme: "https",
33 | host: host,
34 | path: '$basePath/${_paths[endpoint]}'
35 | );
36 |
37 | static Map _paths = {
38 | Endpoint.confirmed: 'confirmed',
39 | Endpoint.recovered: 'recovered',
40 | Endpoint.deaths: 'deaths',
41 | Endpoint.daily: 'daily',
42 | Endpoint.countries: 'countries',
43 | };
44 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Abdullah Chauhan
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:coronavirus_covid19_tracker/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 |
--------------------------------------------------------------------------------
/lib/app/screens/widgets/lastupdated_status_text.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/foundation.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:intl/intl.dart';
5 |
6 | class LastUpdatedDateFormatter {
7 | final DateTime lastUpdatedDate;
8 |
9 | LastUpdatedDateFormatter({@required this.lastUpdatedDate});
10 |
11 | String lastUpdatedStatusText() {
12 | if (lastUpdatedDate != null) {
13 | final formatter = DateFormat.yMMMMEEEEd().add_Hms();
14 | final formatted = formatter.format(lastUpdatedDate);
15 | return '$formatted';
16 | }
17 | return '';
18 | }
19 | }
20 |
21 | class LastUpdatedStatusText extends StatelessWidget {
22 | final String text;
23 |
24 | LastUpdatedStatusText({@required this.text});
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return Column(
29 | crossAxisAlignment: CrossAxisAlignment.start,
30 | children: [
31 | Text(
32 | 'Last Updated at:',
33 | style: Theme.of(context).textTheme.caption,
34 | ),
35 | SizedBox(
36 | height: 2.0,
37 | ),
38 | Text(
39 | text,
40 | style: Theme.of(context).textTheme.subtitle2,
41 | ),
42 | ],
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Coronavirus COVID-19 Tracker
2 |
3 | * **Data Source Repo:** - [COVID-19](https://github.com/CSSEGISandData/COVID-19)
4 | * **API Source Repo:** - [COVID-19-API](https://github.com/mathdroid/covid-19-api)
5 |
6 | ## Screenshots
7 |
8 | 
9 |
10 | ## Without Map
11 |
12 | There's a different branch [without-map-feature](https://github.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker/tree/without-map-feature) which not included any work related to Map. Otherwise you can follow steps mention below.
13 |
14 | ## Note about files
15 |
16 | The following files required API_Key for Google Maps SDK.
17 |
18 | - `android/app/src/main/AndroidManifest.xml`
19 | - `ios/Runner/AppDelegate.swift`
20 |
21 | ### Instructions
22 |
23 | - Get an API key at [Google Cloud Platform](https://cloud.google.com/maps-platform/)
24 | - Follow the complete instructions here: [Google Maps for Flutter](https://pub.dev/packages/google_maps_flutter)
25 |
26 | ### Responsiveness of the app
27 |
28 | - `There may be some issues related to responsive behavior of the app. Just because I'm not focusing on this and also because of NOT using any Media query right now ...`
29 |
30 | ## License
31 |
32 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
33 |
--------------------------------------------------------------------------------
/lib/app/utils/app_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:intl/intl.dart';
3 |
4 | const Color primaryColor = Color(0xFF171B1E);
5 | const Color secondaryColor = Color(0xFF1B232F);
6 | const Color tertiaryColor = Color(0xFF243145);
7 | const Color color_for_active = Color(0xFFFFF492);
8 | const Color color_for_confirmed = Color(0xFFFFC814);
9 | const Color color_for_recovered = Color(0xFF00CC99);
10 | const Color color_for_deaths = Color(0xFFF76353);
11 |
12 | String formattedValue(dynamic value) {
13 | if (value != null) {
14 | return NumberFormat('#,###,###,###').format(value);
15 | }
16 | return '';
17 | }
18 |
19 | String truncateWithEllipsis(int cutoff, String myString) {
20 | return (myString.length <= cutoff)
21 | ? myString
22 | : '${myString.substring(0, cutoff)} ...';
23 | }
24 |
25 | int calcPercentage(int numerator, int denominator) {
26 | if (numerator != null && denominator != null) {
27 | return ((numerator / denominator) * 100).toInt();
28 | }
29 | return 0;
30 | }
31 |
32 | Widget rateDisplay(BuildContext context, int numerator, int denominator,
33 | String text, Color color, TextStyle textStyle, bool inStart) {
34 | final percentageValue = calcPercentage(numerator, denominator);
35 | return Column(
36 | crossAxisAlignment:
37 | inStart ? CrossAxisAlignment.start : CrossAxisAlignment.center,
38 | children: [
39 | Text(
40 | '$percentageValue%',
41 | style: Theme.of(context).textTheme.subtitle1.copyWith(
42 | color: color,
43 | fontWeight: FontWeight.w500,
44 | ),
45 | ),
46 | Text('$text', style: textStyle)
47 | ],
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:provider/provider.dart';
4 | import 'package:coronavirus_covid19_tracker/app/repositories/data_repository.dart';
5 | import 'package:coronavirus_covid19_tracker/app/services/api.dart';
6 | import 'package:coronavirus_covid19_tracker/app/services/api_service.dart';
7 | import 'package:coronavirus_covid19_tracker/app/utils/app_utils.dart';
8 | import 'package:coronavirus_covid19_tracker/app/screens/dashboard.dart';
9 |
10 | void main() {
11 | WidgetsFlutterBinding.ensureInitialized();
12 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
13 | systemNavigationBarColor: primaryColor, // navigation bar color
14 | statusBarColor: primaryColor, // status bar color
15 | ));
16 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
17 | .then((_) {
18 | runApp(new MyApp());
19 | });
20 | }
21 |
22 | class MyApp extends StatelessWidget {
23 | // This widget is the root of your application.
24 | @override
25 | Widget build(BuildContext context) {
26 | return Provider(
27 | create: (context) => DataRepository(apiService: APIService(API())),
28 | child: MaterialApp(
29 | debugShowCheckedModeBanner: false,
30 | title: 'Covid-19 Tracker',
31 | theme: ThemeData.dark().copyWith(
32 | scaffoldBackgroundColor: primaryColor,
33 | cardColor: secondaryColor,
34 | bottomSheetTheme:
35 | BottomSheetThemeData(backgroundColor: primaryColor),
36 | dialogBackgroundColor: secondaryColor,
37 | appBarTheme: AppBarTheme(color: primaryColor)),
38 | home: Dashboard()),
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/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 | COVID-19 Tracker
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | io.flutter.embedded_views_preview
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/lib/app/models/covid19.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:json_annotation/json_annotation.dart';
3 | import 'package:coronavirus_covid19_tracker/app/services/api.dart';
4 |
5 | /// This allows the `Covid19` class to access private members in
6 | /// the generated file. The value for this is *.g.dart, where
7 | /// the star denotes the source file name.
8 | part 'covid19.g.dart';
9 |
10 | /// An annotation for the code generator to know that this class needs the
11 | /// JSON serialization logic to be generated.
12 | @JsonSerializable()
13 |
14 | class Covid19 {
15 | final Map confirmed;
16 | final Map recovered;
17 | final Map deaths;
18 | final DateTime lastUpdate;
19 |
20 | Covid19({@required this.confirmed, @required this.recovered, @required this.deaths, @required this.lastUpdate});
21 |
22 | /// A necessary factory constructor for creating a new Covid19 instance
23 | /// from a map. Pass the map to the generated `_$Covid19FromJson()` constructor.
24 | /// The constructor is named after the source class, in this case, Covid19.
25 | factory Covid19.fromJson(Map json) => _$Covid19FromJson(json);
26 |
27 | /// `toJson` is the convention for a class to declare support for serialization
28 | /// to JSON. The implementation simply calls the private, generated
29 | /// helper method `_$Covid19ToJson`.
30 | Map toJson() => _$Covid19ToJson(this);
31 | }
32 |
33 | class EndpointsData {
34 | final Map> values;
35 |
36 | EndpointsData({@required this.values});
37 |
38 | List get confirmed => values[Endpoint.confirmed];
39 | List get recovered => values[Endpoint.recovered];
40 | List get deaths => values[Endpoint.deaths];
41 | List get dailyUpdates => values[Endpoint.daily];
42 | }
--------------------------------------------------------------------------------
/lib/app/screens/widgets/chart.dart:
--------------------------------------------------------------------------------
1 | import 'package:coronavirus_covid19_tracker/app/utils/app_utils.dart';
2 | import 'package:fl_chart/fl_chart.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class DataChart extends StatelessWidget {
6 | final double confirmed;
7 | final double recovered;
8 | final double deaths;
9 |
10 | const DataChart({Key key, this.confirmed, this.recovered, this.deaths})
11 | : super(key: key);
12 |
13 | List showingSections() {
14 | int lengthOfSections = 3;
15 | return List.generate(lengthOfSections, (i) {
16 | final double radius = 15;
17 | switch (i) {
18 | case 0:
19 | return PieChartSectionData(
20 | color: color_for_confirmed,
21 | value: confirmed,
22 | radius: radius,
23 | title: '',
24 | );
25 | case 1:
26 | return PieChartSectionData(
27 | color: color_for_recovered,
28 | value: recovered,
29 | radius: radius,
30 | title: '',
31 | );
32 | case 2:
33 | return PieChartSectionData(
34 | color: color_for_deaths,
35 | value: deaths,
36 | title: '',
37 | radius: radius,
38 | );
39 | default:
40 | return null;
41 | }
42 | });
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | return Container(
48 | height: 150,
49 | width: 200,
50 | child: PieChart(
51 | PieChartData(
52 | borderData: FlBorderData(
53 | show: false,
54 | ),
55 | sectionsSpace: 0,
56 | centerSpaceRadius: 50,
57 | sections: showingSections()),
58 | swapAnimationDuration: Duration(milliseconds: 750),
59 | ),
60 | );
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/lib/app/repositories/data_repository.dart:
--------------------------------------------------------------------------------
1 | import 'package:coronavirus_covid19_tracker/app/models/covid19.dart';
2 | import 'package:coronavirus_covid19_tracker/app/services/api.dart';
3 | import 'package:coronavirus_covid19_tracker/app/services/api_service.dart';
4 | import 'package:flutter/foundation.dart';
5 | import 'package:http/http.dart';
6 |
7 | class DataRepository {
8 | final APIService apiService;
9 |
10 | DataRepository({@required this.apiService});
11 |
12 | Future getRootData() async {
13 | try {
14 | final data = await apiService.getRootData();
15 | return data;
16 | } on Response catch (response) {
17 | // something else
18 | print(response);
19 | rethrow;
20 | }
21 | }
22 |
23 | Future getAllEndpointsData() async {
24 | final values = await Future.wait([
25 | apiService.getEndpointData(Endpoint.confirmed),
26 | apiService.getEndpointData(Endpoint.recovered),
27 | apiService.getEndpointData(Endpoint.deaths),
28 | apiService.getEndpointData(Endpoint.daily),
29 | ]);
30 |
31 | return EndpointsData(values: {
32 | Endpoint.confirmed: values[0],
33 | Endpoint.recovered: values[1],
34 | Endpoint.deaths: values[2],
35 | Endpoint.daily: values[3],
36 | });
37 | }
38 |
39 | Future getSingleCountryData(String countryName) async {
40 | try {
41 | final data =
42 | await apiService.getSingleCountryData(Endpoint.countries, countryName);
43 | return data;
44 | } on Response catch (response) {
45 | // something else
46 | print(response);
47 | rethrow;
48 | }
49 | }
50 |
51 | Future