├── 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 | ![cover](https://user-images.githubusercontent.com/26044917/79067881-2db97680-7cdc-11ea-9d47-4e853bfe50c1.png) 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> getAllCountriesList() async { 52 | try { 53 | final data = await apiService.getAllCountriesList(Endpoint.countries); 54 | return data; 55 | } on Response catch (response) { 56 | // something else 57 | print(response); 58 | rethrow; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /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.coronavirus_covid19_tracker" 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/app/services/api_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:coronavirus_covid19_tracker/app/models/covid19.dart'; 3 | import 'package:coronavirus_covid19_tracker/app/services/api.dart'; 4 | import 'package:http/http.dart' as http; 5 | 6 | class APIService { 7 | final API api; 8 | 9 | APIService(this.api); 10 | 11 | Future getRootData() async { 12 | final uri = api.apiCallUri(); 13 | final response = await http.get(uri.toString()); 14 | 15 | if (response.statusCode == 200) { 16 | Covid19 covid19 = Covid19.fromJson(json.decode(response.body)); 17 | return covid19; 18 | } 19 | print( 20 | 'Request ${api.apiCallUri()} failed\nResponse: ${response.statusCode} ${response.reasonPhrase}'); 21 | throw response; 22 | } 23 | 24 | Future getSingleCountryData(Endpoint endpoint, String country) async { 25 | final uri = api.endpointUriForCountry(endpoint, country); 26 | final response = await http.get(uri.toString()); 27 | 28 | if (response.statusCode == 200) { 29 | Covid19 covid19 = Covid19.fromJson(json.decode(response.body)); 30 | return covid19; 31 | } 32 | print( 33 | 'Request ${api.endpointUriForCountry(endpoint, country)} failed\nResponse: ${response.statusCode} ${response.reasonPhrase}'); 34 | throw response; 35 | } 36 | 37 | Future> getAllCountriesList(Endpoint endpoint) async { 38 | final uri = api.endpointUriForAllCountries(endpoint); 39 | final response = await http.get(uri.toString()); 40 | 41 | if (response.statusCode == 200) { 42 | final data = json.decode(response.body); 43 | return data; 44 | } 45 | print( 46 | 'Request ${api.endpointUriForAllCountries(endpoint)} failed\nResponse: ${response.statusCode} ${response.reasonPhrase}'); 47 | throw response; 48 | } 49 | 50 | Future> getEndpointData(Endpoint endpoint) async { 51 | final uri = api.endpointUri(endpoint); 52 | final response = await http.get(uri.toString()); 53 | 54 | if (response.statusCode == 200) { 55 | final data = json.decode(response.body); 56 | return data; 57 | } 58 | print( 59 | 'Request ${api.endpointUri(endpoint)} failed\nResponse: ${response.statusCode} ${response.reasonPhrase}'); 60 | throw response; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/app/screens/widgets/alert_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | Widget personalInfo(BuildContext context) { 8 | return Column( 9 | mainAxisSize: MainAxisSize.min, 10 | children: [ 11 | Text('Abdullah Chauhan', textAlign: TextAlign.center), 12 | SizedBox(height: 4.0), 13 | Text( 14 | 'acse.uok@outlook.com', 15 | textAlign: TextAlign.center, 16 | style: Theme.of(context).textTheme.caption, 17 | ), 18 | Divider(), 19 | Row( 20 | mainAxisAlignment: MainAxisAlignment.center, 21 | children: [ 22 | Text('Made with ', 23 | style: TextStyle( 24 | letterSpacing: .5, 25 | )), 26 | Icon( 27 | Icons.favorite, 28 | color: Colors.lightBlueAccent, 29 | size: 14, 30 | ), 31 | Text(' in Flutter', style: TextStyle(letterSpacing: .5)), 32 | ], 33 | ) 34 | ], 35 | ); 36 | } 37 | 38 | Future showAlertDialog({ 39 | @required BuildContext context, 40 | String title, 41 | CachedNetworkImage avatar, 42 | String content, 43 | @required bool isPersonalInfo, 44 | @required String defaultActionText, 45 | }) async { 46 | // if platform is iOS 47 | if (Platform.isIOS) { 48 | return await showCupertinoDialog( 49 | context: context, 50 | builder: (context) => AlertDialog( 51 | title: title != null ? Text(title) : avatar, 52 | content: isPersonalInfo ? personalInfo(context) : Text(content), 53 | actions: [ 54 | FlatButton( 55 | child: Text(defaultActionText), 56 | onPressed: () => Navigator.of(context).pop(), 57 | ) 58 | ], 59 | ), 60 | ); 61 | } 62 | return await showDialog( 63 | context: context, 64 | builder: (context) => AlertDialog( 65 | title: title != null ? Text(title) : avatar, 66 | content: isPersonalInfo ? personalInfo(context) : Text(content), 67 | actions: [ 68 | FlatButton( 69 | child: Text(defaultActionText), 70 | onPressed: () => Navigator.of(context).pop(), 71 | ) 72 | ], 73 | ), 74 | ); 75 | } 76 | -------------------------------------------------------------------------------- /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 | 9 | 13 | 14 | 16 | 17 | 24 | 28 | 32 | 37 | 41 | 42 | 43 | 44 | 45 | 46 | 48 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/app/screens/widgets/global_stats_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:coronavirus_covid19_tracker/app/utils/app_utils.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class GlobalStatsCard extends StatelessWidget { 5 | final String title; 6 | final Color color; 7 | final String assetName; 8 | final int value; 9 | final String mapText; 10 | final bool textChanged; 11 | final Widget rateDisplay; 12 | 13 | const GlobalStatsCard( 14 | {Key key, 15 | @required this.title, 16 | @required this.color, 17 | @required this.assetName, 18 | @required this.value, 19 | @required this.mapText, 20 | @required this.textChanged, 21 | this.rateDisplay}) 22 | : super(key: key); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | final cases = formattedValue(value); 27 | return Padding( 28 | padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 0.0), 29 | child: Card( 30 | child: Padding( 31 | padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 6.0), 32 | child: Column( 33 | crossAxisAlignment: CrossAxisAlignment.start, 34 | children: [ 35 | Row( 36 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 37 | children: [ 38 | Text( 39 | title, 40 | style: Theme.of(context).textTheme.headline6.copyWith( 41 | color: color, 42 | fontWeight: FontWeight.w400, 43 | ), 44 | ), 45 | AnimatedDefaultTextStyle( 46 | style: textChanged 47 | ? TextStyle( 48 | color: Colors.white30, 49 | fontSize: 12.0, 50 | letterSpacing: .5, 51 | fontStyle: FontStyle.italic) 52 | : TextStyle( 53 | color: Colors.white12, 54 | fontSize: 10.0, 55 | letterSpacing: .5, 56 | fontStyle: FontStyle.italic), 57 | duration: const Duration(milliseconds: 250), 58 | child: Text(mapText), 59 | ) 60 | ], 61 | ), 62 | SizedBox( 63 | height: 6.0, 64 | ), 65 | Row( 66 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 67 | crossAxisAlignment: CrossAxisAlignment.center, 68 | children: [ 69 | Image.asset( 70 | assetName, 71 | color: color, 72 | width: 28.0, 73 | ), 74 | SizedBox( 75 | width: 8.0, 76 | ), 77 | if (rateDisplay != null) rateDisplay, 78 | Spacer(), 79 | Text(cases, 80 | style: Theme.of(context) 81 | .textTheme 82 | .headline4 83 | .copyWith(color: color, fontWeight: FontWeight.w600)), 84 | ], 85 | ), 86 | ], 87 | ), 88 | )), 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: coronavirus_covid19_tracker 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | google_maps_flutter: ^0.5.25 27 | http: ^0.12.0+4 28 | provider: ^4.0.4 29 | json_annotation: ^3.0.1 30 | intl: ^0.16.1 31 | fl_chart: ^0.8.7 32 | cached_network_image: ^2.1.0+1 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^0.1.3 37 | 38 | dev_dependencies: 39 | flutter_test: 40 | sdk: flutter 41 | json_serializable: ^3.3.0 42 | build_runner: ^1.8.0 43 | flutter_launcher_icons: "^0.7.3" 44 | 45 | flutter_icons: 46 | android: "ic_launcher" 47 | ios: true 48 | image_path: "assets/icons/app_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. 58 | uses-material-design: true 59 | 60 | # To add assets to your application, add an assets section, like this: 61 | assets: 62 | - assets/map_styles/style.json 63 | - assets/icons/count.png 64 | - assets/icons/death.png 65 | - assets/icons/fever.png 66 | - assets/icons/patient.png 67 | - assets/icons/suspect.png 68 | - assets/icons/img_deaths_marker1.png 69 | - assets/icons/img_deaths_marker2.png 70 | - assets/icons/img_deaths_marker3.png 71 | # - images/a_dot_burr.jpeg 72 | # - images/a_dot_ham.jpeg 73 | # An image asset can refer to one or more resolution-specific "variants", see 74 | # https://flutter.dev/assets-and-images/#resolution-aware. 75 | # For details regarding adding assets from package dependencies, see 76 | # https://flutter.dev/assets-and-images/#from-packages 77 | # To add custom fonts to your application, add a fonts section here, 78 | # in this "flutter" section. Each entry in this list should have a 79 | # "family" key with the font family name, and a "fonts" key with a 80 | # list giving the asset and other descriptors for the font. For 81 | # example: 82 | # fonts: 83 | # - family: Schyler 84 | # fonts: 85 | # - asset: fonts/Schyler-Regular.ttf 86 | # - asset: fonts/Schyler-Italic.ttf 87 | # style: italic 88 | # - family: Trajan Pro 89 | # fonts: 90 | # - asset: fonts/TrajanPro.ttf 91 | # - asset: fonts/TrajanPro_Bold.ttf 92 | # weight: 700 93 | # 94 | # For details regarding fonts from package dependencies, 95 | # see https://flutter.dev/custom-fonts/#from-packages 96 | -------------------------------------------------------------------------------- /lib/app/screens/widgets/bottom_sheet.dart: -------------------------------------------------------------------------------- 1 | import 'package:coronavirus_covid19_tracker/app/utils/app_utils.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | typedef SelectedCountry(String country); 6 | 7 | class BottomSheetWidget extends StatefulWidget { 8 | final SelectedCountry selectedCountry; 9 | final List countries; 10 | const BottomSheetWidget({Key key, this.countries, this.selectedCountry}) 11 | : super(key: key); 12 | 13 | @override 14 | _BottomSheetWidgetState createState() => _BottomSheetWidgetState(); 15 | } 16 | 17 | class _BottomSheetWidgetState extends State { 18 | List _filteredCountries; 19 | TextEditingController _countrySearchCtrl = TextEditingController(); 20 | 21 | @override 22 | void initState() { 23 | _filteredCountries = widget.countries; 24 | super.initState(); 25 | } 26 | 27 | void _filterCountries(value) { 28 | setState(() { 29 | _filteredCountries = widget.countries 30 | .where((country) => 31 | country['name'].toLowerCase().contains(value.toLowerCase())) 32 | .toList(); 33 | }); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | return Column( 39 | children: [ 40 | Padding( 41 | padding: const EdgeInsets.all(16.0), 42 | child: TextField( 43 | controller: _countrySearchCtrl, 44 | onChanged: (value) { 45 | _filterCountries(value); 46 | }, 47 | decoration: InputDecoration( 48 | prefixIcon: Icon(Icons.search), 49 | enabledBorder: OutlineInputBorder( 50 | borderRadius: BorderRadius.circular(24.0), 51 | borderSide: const BorderSide( 52 | color: Color.fromRGBO(225, 225, 225, .5), width: 1.0), 53 | ), 54 | focusedBorder: OutlineInputBorder( 55 | borderRadius: BorderRadius.circular(24.0), 56 | borderSide: const BorderSide( 57 | color: Color.fromRGBO(225, 225, 225, 1), width: 1.0), 58 | ), 59 | hintText: "Search for country", 60 | contentPadding: const EdgeInsets.only( 61 | top: 20, left: 20, right: 20, bottom: 10)), 62 | ), 63 | ), 64 | Expanded( 65 | child: ListView.builder( 66 | itemCount: _filteredCountries.length, 67 | itemBuilder: (context, index) { 68 | final country = _filteredCountries[index]['name']; 69 | final iso2 = _filteredCountries[index]["iso2"]; 70 | final iso3 = _filteredCountries[index]["iso3"]; 71 | final subtitle = iso3 != null 72 | ? Text(iso3) 73 | : (iso2 != null 74 | ? Text(iso2) 75 | : Text('Not available')); 76 | return ListTile( 77 | onTap: () { 78 | widget.selectedCountry(country); 79 | // popping out bottom sheet 80 | Navigator.pop(context); 81 | }, 82 | leading: CircleAvatar( 83 | backgroundColor: primaryColor, 84 | child: Text('${index + 1}'),), 85 | title: Text(country), 86 | subtitle: subtitle, 87 | // trailing: Icon(Icons.favorite_border), 88 | ); 89 | }), 90 | ), 91 | ], 92 | ); 93 | } 94 | } 95 | 96 | Future showCountriesList( 97 | {@required BuildContext context, 98 | @required List countries, 99 | @required Function selectedCountry}) async { 100 | return await showModalBottomSheet( 101 | context: context, 102 | builder: (context) => BottomSheetWidget( 103 | countries: countries, 104 | selectedCountry: selectedCountry, 105 | )); 106 | } 107 | -------------------------------------------------------------------------------- /assets/map_styles/style.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "elementType": "geometry", 4 | "stylers": [ 5 | { 6 | "color": "#365c91" 7 | } 8 | ] 9 | }, 10 | { 11 | "elementType": "labels.text.fill", 12 | "stylers": [ 13 | { 14 | "color": "#ffffff" 15 | } 16 | ] 17 | }, 18 | { 19 | "elementType": "labels.text.stroke", 20 | "stylers": [ 21 | { 22 | "color": "#365c91" 23 | } 24 | ] 25 | }, 26 | { 27 | "featureType": "administrative.land_parcel", 28 | "stylers": [ 29 | { 30 | "visibility": "off" 31 | } 32 | ] 33 | }, 34 | { 35 | "featureType": "administrative.locality", 36 | "elementType": "labels.text.fill", 37 | "stylers": [ 38 | { 39 | "color": "#d59563" 40 | } 41 | ] 42 | }, 43 | { 44 | "featureType": "administrative.neighborhood", 45 | "stylers": [ 46 | { 47 | "visibility": "off" 48 | } 49 | ] 50 | }, 51 | { 52 | "featureType": "poi", 53 | "elementType": "labels.text", 54 | "stylers": [ 55 | { 56 | "visibility": "off" 57 | } 58 | ] 59 | }, 60 | { 61 | "featureType": "poi", 62 | "elementType": "labels.text.fill", 63 | "stylers": [ 64 | { 65 | "color": "#d59563" 66 | } 67 | ] 68 | }, 69 | { 70 | "featureType": "poi.business", 71 | "stylers": [ 72 | { 73 | "visibility": "off" 74 | } 75 | ] 76 | }, 77 | { 78 | "featureType": "poi.park", 79 | "elementType": "geometry", 80 | "stylers": [ 81 | { 82 | "color": "#263c3f" 83 | } 84 | ] 85 | }, 86 | { 87 | "featureType": "poi.park", 88 | "elementType": "labels.text.fill", 89 | "stylers": [ 90 | { 91 | "color": "#6b9a76" 92 | } 93 | ] 94 | }, 95 | { 96 | "featureType": "road", 97 | "elementType": "geometry", 98 | "stylers": [ 99 | { 100 | "color": "#38414e" 101 | } 102 | ] 103 | }, 104 | { 105 | "featureType": "road", 106 | "elementType": "geometry.stroke", 107 | "stylers": [ 108 | { 109 | "color": "#212a37" 110 | } 111 | ] 112 | }, 113 | { 114 | "featureType": "road", 115 | "elementType": "labels", 116 | "stylers": [ 117 | { 118 | "visibility": "off" 119 | } 120 | ] 121 | }, 122 | { 123 | "featureType": "road", 124 | "elementType": "labels.icon", 125 | "stylers": [ 126 | { 127 | "visibility": "off" 128 | } 129 | ] 130 | }, 131 | { 132 | "featureType": "road", 133 | "elementType": "labels.text.fill", 134 | "stylers": [ 135 | { 136 | "color": "#9ca5b3" 137 | } 138 | ] 139 | }, 140 | { 141 | "featureType": "road.highway", 142 | "elementType": "geometry", 143 | "stylers": [ 144 | { 145 | "color": "#746855" 146 | } 147 | ] 148 | }, 149 | { 150 | "featureType": "road.highway", 151 | "elementType": "geometry.stroke", 152 | "stylers": [ 153 | { 154 | "color": "#1f2835" 155 | } 156 | ] 157 | }, 158 | { 159 | "featureType": "road.highway", 160 | "elementType": "labels.text.fill", 161 | "stylers": [ 162 | { 163 | "color": "#f3d19c" 164 | } 165 | ] 166 | }, 167 | { 168 | "featureType": "transit", 169 | "stylers": [ 170 | { 171 | "visibility": "off" 172 | } 173 | ] 174 | }, 175 | { 176 | "featureType": "transit", 177 | "elementType": "geometry", 178 | "stylers": [ 179 | { 180 | "color": "#2f3948" 181 | } 182 | ] 183 | }, 184 | { 185 | "featureType": "transit.station", 186 | "elementType": "labels.text.fill", 187 | "stylers": [ 188 | { 189 | "color": "#d59563" 190 | } 191 | ] 192 | }, 193 | { 194 | "featureType": "water", 195 | "elementType": "geometry", 196 | "stylers": [ 197 | { 198 | "color": "#17263c" 199 | } 200 | ] 201 | }, 202 | { 203 | "featureType": "water", 204 | "elementType": "labels.text", 205 | "stylers": [ 206 | { 207 | "visibility": "off" 208 | } 209 | ] 210 | }, 211 | { 212 | "featureType": "water", 213 | "elementType": "labels.text.fill", 214 | "stylers": [ 215 | { 216 | "color": "#515c6d" 217 | } 218 | ] 219 | }, 220 | { 221 | "featureType": "water", 222 | "elementType": "labels.text.stroke", 223 | "stylers": [ 224 | { 225 | "color": "#17263c" 226 | } 227 | ] 228 | } 229 | ] -------------------------------------------------------------------------------- /lib/app/screens/daily_update.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:intl/intl.dart'; 3 | 4 | class DailyUpdates extends StatelessWidget { 5 | final List dailyUpdates; 6 | final Color color1; 7 | final Color color2; 8 | 9 | const DailyUpdates({Key key, this.dailyUpdates, this.color1, this.color2}) 10 | : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | final reversedList = dailyUpdates.reversed.toList(); 15 | return Scaffold( 16 | appBar: AppBar( 17 | title: Text('Global Cases per day'), 18 | ), 19 | body: ListView.builder( 20 | itemCount: reversedList.length, 21 | itemBuilder: (context, index) { 22 | final date = reversedList[index]['reportDate']; 23 | final confirmedCases = reversedList[index]['totalConfirmed']; 24 | final deaths = reversedList[index]['deaths']['total']; 25 | return Padding( 26 | padding: 27 | const EdgeInsets.symmetric(horizontal: 8.0, vertical: 6.0), 28 | child: Container( 29 | color: Theme.of(context).cardColor, 30 | child: ListTile( 31 | leading: 32 | Icon(Icons.access_time, size: 28, color: Colors.cyan), 33 | title: Column( 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | Text( 37 | DateFormat().add_yMMMd().format(DateTime.parse(date)), 38 | style: Theme.of(context) 39 | .textTheme 40 | .headline6 41 | .copyWith(fontWeight: FontWeight.w300), 42 | ), 43 | SizedBox( 44 | height: 4.0, 45 | ), 46 | Row( 47 | children: [ 48 | Icon( 49 | Icons.trending_down, 50 | size: 18, 51 | color: Colors.cyan, 52 | ), 53 | SizedBox(width: 6.0), 54 | index == reversedList.length - 1 55 | ? Text( 56 | 'Confirmed: $confirmedCases', 57 | style: Theme.of(context) 58 | .textTheme 59 | .bodyText2 60 | .copyWith( 61 | color: color1, 62 | fontWeight: FontWeight.w600), 63 | ) 64 | : Text( 65 | 'Confirmed: ${confirmedCases - reversedList[index + 1]['totalConfirmed']}', 66 | style: Theme.of(context) 67 | .textTheme 68 | .bodyText2 69 | .copyWith( 70 | color: color1, 71 | fontWeight: FontWeight.w600), 72 | ), 73 | SizedBox(width: 8.0), 74 | index == reversedList.length - 1 75 | ? Text( 76 | 'Deaths: $deaths', 77 | style: Theme.of(context) 78 | .textTheme 79 | .bodyText2 80 | .copyWith( 81 | color: color2, 82 | fontWeight: FontWeight.w600), 83 | ) 84 | : Text( 85 | 'Deaths: ${deaths - reversedList[index + 1]['deaths']['total']}', 86 | style: Theme.of(context) 87 | .textTheme 88 | .bodyText2 89 | .copyWith( 90 | color: color2, 91 | fontWeight: FontWeight.w600), 92 | ), 93 | ], 94 | ), 95 | ], 96 | ), 97 | ), 98 | ), 99 | ); 100 | }), 101 | ); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /lib/app/screens/map.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 4 | 5 | class Country { 6 | final String name; 7 | final int cases; 8 | 9 | Country(this.name, this.cases) 10 | : assert(name != null), 11 | assert(cases != null); 12 | } 13 | 14 | class MapScreen extends StatefulWidget { 15 | final List endpointsData; 16 | final double latitude; 17 | final double longitude; 18 | final bool confirmed; 19 | final bool recovered; 20 | final bool deaths; 21 | final String assetName; 22 | final String title; 23 | 24 | const MapScreen( 25 | {Key key, 26 | @required this.endpointsData, 27 | @required this.latitude, 28 | @required this.longitude, 29 | @required this.assetName, 30 | @required this.confirmed, 31 | @required this.recovered, 32 | @required this.deaths, 33 | @required this.title}) 34 | : super(key: key); 35 | @override 36 | _MapScreenState createState() => _MapScreenState(); 37 | } 38 | 39 | class _MapScreenState extends State { 40 | GoogleMapController _controller; 41 | Map allLatLongsData; 42 | 43 | @override 44 | void initState() { 45 | allLatLongsData = {}; 46 | generateAllLatLongs(); 47 | super.initState(); 48 | } 49 | 50 | Map generateAllLatLongs() { 51 | widget.endpointsData.forEach((value) { 52 | if (value['lat'] != null && value['long'] != null) { 53 | final latitude = value['lat'].toDouble(); 54 | final longitude = value['long'].toDouble(); 55 | final name = value['provinceState'] != null 56 | ? value['provinceState'] 57 | : value['countryRegion']; 58 | final cases = widget.confirmed 59 | ? value['confirmed'] 60 | : (widget.recovered ? value['recovered'] : value['deaths']); 61 | allLatLongsData[Country(name, cases)] = LatLng(latitude, longitude); 62 | } 63 | }); 64 | return allLatLongsData; 65 | } 66 | 67 | Future> generateMarkers(Map positions) async { 68 | List markers = []; 69 | final icon = await BitmapDescriptor.fromAssetImage( 70 | ImageConfiguration(), widget.assetName); 71 | positions.forEach((k, v) { 72 | final marker = Marker( 73 | markerId: MarkerId(k.name), 74 | position: LatLng(v.latitude, v.longitude), 75 | icon: icon, 76 | infoWindow: 77 | InfoWindow(title: '${k.name}', snippet: 'Cases: ${k.cases}'), 78 | anchor: Offset(0.5, 0.5)); 79 | markers.add(marker); 80 | }); 81 | return markers.toSet(); 82 | } 83 | 84 | Future getJsonFile(String path) async { 85 | return await rootBundle.loadString(path); 86 | } 87 | 88 | void setMapStyle(String mapStyle) { 89 | _controller.setMapStyle(mapStyle); 90 | } 91 | 92 | @override 93 | Widget build(BuildContext context) { 94 | return Scaffold( 95 | body: SafeArea( 96 | child: Stack( 97 | children: [ 98 | FutureBuilder( 99 | future: generateMarkers(allLatLongsData), 100 | initialData: Set.of([]), 101 | builder: (context, snapshot) => GoogleMap( 102 | initialCameraPosition: CameraPosition( 103 | target: LatLng(widget.latitude, widget.longitude)), 104 | markers: snapshot.data, 105 | mapToolbarEnabled: false, 106 | rotateGesturesEnabled: false, 107 | scrollGesturesEnabled: true, 108 | // zoomGesturesEnabled: false, 109 | onMapCreated: (GoogleMapController controller) { 110 | _controller = controller; 111 | getJsonFile("assets/map_styles/style.json").then(setMapStyle); 112 | }, 113 | ), 114 | ), 115 | Positioned.fill( 116 | child: Align( 117 | alignment: Alignment.topCenter, 118 | child: Container( 119 | width: double.infinity, 120 | height: 50, 121 | decoration: BoxDecoration( 122 | color: Color.fromRGBO(23, 27, 30, .75), 123 | ), 124 | child: Center( 125 | child: Padding( 126 | padding: const EdgeInsets.all(8.0), 127 | child: Text( 128 | 'Global ${widget.title} cases per country/region/state' 129 | .toUpperCase(), 130 | textAlign: TextAlign.center, 131 | style: Theme.of(context) 132 | .textTheme 133 | .subtitle2 134 | .copyWith( 135 | letterSpacing: .75, 136 | )), 137 | ), 138 | ))), 139 | ), 140 | ], 141 | ), 142 | ), 143 | ); 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /lib/app/screens/widgets/country_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:coronavirus_covid19_tracker/app/models/covid19.dart'; 2 | import 'package:coronavirus_covid19_tracker/app/screens/widgets/alert_dialog.dart'; 3 | import 'package:coronavirus_covid19_tracker/app/screens/widgets/chart.dart'; 4 | import 'package:coronavirus_covid19_tracker/app/utils/app_utils.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:intl/intl.dart'; 7 | 8 | class CountryCard extends StatelessWidget { 9 | final Covid19 countryData; 10 | final Color color1; 11 | final Color color2; 12 | final Color color3; 13 | final Color color4; 14 | final String countryName; 15 | final Widget rateDisplay1; 16 | final Widget rateDisplay2; 17 | 18 | const CountryCard({ 19 | Key key, 20 | @required this.countryData, 21 | @required this.color1, 22 | @required this.color2, 23 | @required this.color3, 24 | @required this.color4, 25 | @required this.countryName, 26 | @required this.rateDisplay1, 27 | @required this.rateDisplay2, 28 | }) : super(key: key); 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | int _confirmedCases = countryData.confirmed['value']; 33 | int _recoveredCases = countryData.recovered['value']; 34 | int _deaths = countryData.deaths['value']; 35 | int _activeCases = (_confirmedCases - _recoveredCases) - _deaths; 36 | return Padding( 37 | padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 0.0), 38 | child: Card( 39 | child: Padding( 40 | padding: const EdgeInsets.all(10.0), 41 | child: Column( 42 | crossAxisAlignment: CrossAxisAlignment.start, 43 | children: [ 44 | Row( 45 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 46 | children: [ 47 | Text('COUNTRY UPDATE', 48 | style: Theme.of(context) 49 | .textTheme 50 | .caption 51 | .copyWith(letterSpacing: 1.25)), 52 | GestureDetector( 53 | child: Icon( 54 | Icons.assignment_late, 55 | size: 20.0, 56 | color: Colors.white70, 57 | ), 58 | onTap: () => showAlertDialog( 59 | context: context, 60 | title: "Keep patience", 61 | content: 62 | "After selecting the new country, you've to wait for 1/3 secs so it will re-update the card. Its totally depend on your internet connection.", 63 | isPersonalInfo: false, 64 | defaultActionText: "Ok"), 65 | ) 66 | ], 67 | ), 68 | SizedBox( 69 | height: 2.0, 70 | ), 71 | Row( 72 | children: [ 73 | Text('Last Updated at: ', 74 | style: Theme.of(context).textTheme.caption), 75 | Text( 76 | '${DateFormat().add_yMMMMEEEEd().format(countryData.lastUpdate)}') 77 | ], 78 | ), 79 | SizedBox( 80 | height: 8.0, 81 | ), 82 | Container( 83 | decoration: BoxDecoration( 84 | border: Border( 85 | left: BorderSide( 86 | color: Colors.white70, 87 | width: 4.0, 88 | )), 89 | ), 90 | child: Padding( 91 | padding: const EdgeInsets.only(left: 6.0), 92 | child: Column( 93 | crossAxisAlignment: CrossAxisAlignment.start, 94 | children: [ 95 | Text(truncateWithEllipsis(20, countryName).toUpperCase(), 96 | style: Theme.of(context).textTheme.headline6.copyWith( 97 | letterSpacing: 1, fontWeight: FontWeight.w300)), 98 | Text('Active cases: ${_activeCases.abs()}', 99 | style: Theme.of(context).textTheme.caption.copyWith( 100 | letterSpacing: .5, 101 | )), 102 | ], 103 | ), 104 | ), 105 | ), 106 | SizedBox( 107 | height: 8.0, 108 | ), 109 | Row( 110 | mainAxisAlignment: MainAxisAlignment.center, 111 | children: [ 112 | if (rateDisplay1 != null) rateDisplay1, 113 | SizedBox(width: 16.0), 114 | if (rateDisplay2 != null) rateDisplay2 115 | ], 116 | ), 117 | SizedBox( 118 | height: 4.0, 119 | ), 120 | Row( 121 | children: [ 122 | DataChart( 123 | confirmed: _confirmedCases.toDouble(), 124 | recovered: _recoveredCases.toDouble(), 125 | deaths: _deaths.toDouble(), 126 | ), 127 | Column( 128 | crossAxisAlignment: CrossAxisAlignment.start, 129 | children: [ 130 | Text('$_confirmedCases', 131 | style: Theme.of(context) 132 | .textTheme 133 | .headline6 134 | .copyWith(fontWeight: FontWeight.w500)), 135 | Text('Confirmed', 136 | style: Theme.of(context).textTheme.subtitle2.copyWith( 137 | color: color2, 138 | )), 139 | SizedBox(height: 12.0), 140 | Text('$_recoveredCases', 141 | style: Theme.of(context) 142 | .textTheme 143 | .headline6 144 | .copyWith(fontWeight: FontWeight.w500)), 145 | Text('Recovered', 146 | style: Theme.of(context) 147 | .textTheme 148 | .subtitle2 149 | .copyWith(color: color3)), 150 | SizedBox(height: 12.0), 151 | Text('$_deaths', 152 | style: Theme.of(context) 153 | .textTheme 154 | .headline6 155 | .copyWith(fontWeight: FontWeight.w500)), 156 | Text('Deaths', 157 | style: Theme.of(context) 158 | .textTheme 159 | .subtitle2 160 | .copyWith(color: color4)), 161 | ], 162 | ), 163 | ], 164 | ), 165 | ], 166 | ), 167 | ), 168 | ), 169 | ); 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /lib/app/screens/dashboard.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:cached_network_image/cached_network_image.dart'; 3 | import 'package:coronavirus_covid19_tracker/app/models/covid19.dart'; 4 | import 'package:coronavirus_covid19_tracker/app/repositories/data_repository.dart'; 5 | import 'package:coronavirus_covid19_tracker/app/screens/daily_update.dart'; 6 | import 'package:coronavirus_covid19_tracker/app/screens/map.dart'; 7 | import 'package:coronavirus_covid19_tracker/app/screens/widgets/alert_dialog.dart'; 8 | import 'package:coronavirus_covid19_tracker/app/screens/widgets/bottom_sheet.dart'; 9 | import 'package:coronavirus_covid19_tracker/app/screens/widgets/country_card.dart'; 10 | import 'package:coronavirus_covid19_tracker/app/screens/widgets/global_stats_card.dart'; 11 | import 'package:coronavirus_covid19_tracker/app/screens/widgets/lastupdated_status_text.dart'; 12 | import 'package:coronavirus_covid19_tracker/app/services/api.dart'; 13 | import 'package:coronavirus_covid19_tracker/app/utils/app_utils.dart'; 14 | import 'package:flutter/cupertino.dart'; 15 | import 'package:flutter/material.dart'; 16 | import 'package:provider/provider.dart'; 17 | 18 | class Dashboard extends StatefulWidget { 19 | @override 20 | _DashboardState createState() => _DashboardState(); 21 | } 22 | 23 | class _DashboardState extends State { 24 | int _overallConfirmedCases; 25 | int _overallRecoveredCases; 26 | int _overallDeaths; 27 | EndpointsData _endpointsData; 28 | DateTime _lastUpdatedDate; 29 | Covid19 _countryData; 30 | List _countries; 31 | String _countryName; 32 | double _latitude; 33 | double _longitude; 34 | String _mapText; 35 | bool _textChanged; 36 | 37 | @override 38 | void initState() { 39 | _countryName = 'Pakistan'; 40 | _mapText = 'Loading Map ...'; 41 | _textChanged = false; 42 | _latitude = 30.3753; 43 | _longitude = 69.3451; 44 | _updateData(); 45 | super.initState(); 46 | } 47 | 48 | void updateCountry(String countryName) { 49 | setState(() { 50 | _countryName = countryName; 51 | }); 52 | _getSingleCountryData(countryName); 53 | _updatedCountryCordinates(_endpointsData, Endpoint.confirmed); 54 | } 55 | 56 | Future _updateData() async { 57 | try { 58 | final dataRepository = 59 | Provider.of(context, listen: false); 60 | final rootData = await dataRepository.getRootData(); 61 | setState(() { 62 | _overallConfirmedCases = rootData.confirmed['value']; 63 | _overallRecoveredCases = rootData.recovered['value']; 64 | _overallDeaths = rootData.deaths['value']; 65 | _lastUpdatedDate = rootData.lastUpdate; 66 | }); 67 | _getEndpointsData(); 68 | _getSingleCountryData(_countryName); 69 | _getAllCountries(); 70 | } on SocketException catch (_) { 71 | // await is unnecessary here 72 | showAlertDialog( 73 | context: context, 74 | title: 'Connection error', 75 | content: 'Could not retreive data. Please try again later.', 76 | isPersonalInfo: false, 77 | defaultActionText: 'Ok'); 78 | } 79 | } 80 | 81 | Future _getEndpointsData() async { 82 | final dataRepository1 = Provider.of(context, listen: false); 83 | final endpointsData = await dataRepository1.getAllEndpointsData(); 84 | setState(() { 85 | _endpointsData = endpointsData; 86 | _mapText = 'Tap to view map'; 87 | _textChanged = true; 88 | }); 89 | } 90 | 91 | Future _getSingleCountryData(String countryName) async { 92 | final dataRepository2 = Provider.of(context, listen: false); 93 | final countryData = await dataRepository2.getSingleCountryData(countryName); 94 | setState(() { 95 | _countryData = countryData; 96 | }); 97 | } 98 | 99 | Future _getAllCountries() async { 100 | final dataRepository2 = Provider.of(context, listen: false); 101 | final countries = await dataRepository2.getAllCountriesList(); 102 | setState(() { 103 | _countries = countries['countries']; 104 | }); 105 | } 106 | 107 | void _updatedCountryCordinates( 108 | EndpointsData endpointsData, Endpoint endpoint) { 109 | final value = endpointsData.values[endpoint].where((country) => 110 | country['countryRegion'] 111 | .toLowerCase() 112 | .contains(_countryName.toLowerCase())); 113 | value.forEach((element) { 114 | setState(() { 115 | if (element['lat'] != null && element['long'] != null) { 116 | _latitude = element['lat'].toDouble(); 117 | _longitude = element['long'].toDouble(); 118 | } 119 | }); 120 | }); 121 | } 122 | 123 | @override 124 | Widget build(BuildContext context) { 125 | final formatter = LastUpdatedDateFormatter( 126 | lastUpdatedDate: _lastUpdatedDate != null ? _lastUpdatedDate : null); 127 | final textStyleForRate = TextStyle( 128 | color: Colors.white30, 129 | fontSize: 12.0, 130 | letterSpacing: .5, 131 | fontStyle: FontStyle.italic, 132 | ); 133 | return Scaffold( 134 | body: RefreshIndicator( 135 | onRefresh: _updateData, 136 | child: ListView( 137 | children: [ 138 | Padding( 139 | padding: 140 | const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), 141 | child: Column( 142 | crossAxisAlignment: CrossAxisAlignment.start, 143 | children: [ 144 | Row( 145 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 146 | children: [ 147 | Text('Coronavirus COVID-19 Global Cases', 148 | style: Theme.of(context).textTheme.subtitle1), 149 | GestureDetector( 150 | child: Icon( 151 | Icons.account_circle, 152 | size: 24.0, 153 | color: Colors.white70, 154 | ), 155 | onTap: () => showAlertDialog( 156 | context: context, 157 | avatar: CachedNetworkImage( 158 | fit: BoxFit.cover, 159 | imageUrl: 160 | 'https://avatars1.githubusercontent.com/u/26044917?s=460&u=e0bea0fa9c6cab1d1136bfca6d523d1138f31b3f&v=4', 161 | imageBuilder: (context, imageProvider) => Center( 162 | child: CircleAvatar( 163 | backgroundImage: imageProvider, 164 | radius: 64, 165 | ), 166 | ), 167 | placeholder: (context, url) => Center( 168 | child: CircularProgressIndicator( 169 | backgroundColor: Colors.black54, 170 | strokeWidth: 2.0, 171 | )), 172 | errorWidget: (context, url, error) => 173 | Icon(Icons.error), 174 | ), 175 | isPersonalInfo: true, 176 | defaultActionText: "Close"), 177 | ) 178 | ], 179 | ), 180 | SizedBox(height: 8.0), 181 | LastUpdatedStatusText( 182 | text: formatter.lastUpdatedStatusText()), 183 | ], 184 | ), 185 | ), 186 | GestureDetector( 187 | onTap: () { 188 | if (_endpointsData != null) { 189 | Navigator.push(context, MaterialPageRoute(builder: (_) { 190 | return MapScreen( 191 | endpointsData: _endpointsData.confirmed, 192 | latitude: _latitude, 193 | longitude: _longitude, 194 | assetName: 'assets/icons/img_deaths_marker1.png', 195 | confirmed: true, 196 | recovered: false, 197 | deaths: false, 198 | title: 'Confirmed', 199 | ); 200 | })); 201 | } 202 | }, 203 | child: GlobalStatsCard( 204 | title: 'Total Confirmed', 205 | color: color_for_confirmed, 206 | assetName: 'assets/icons/fever.png', 207 | value: 208 | _overallConfirmedCases != null ? _overallConfirmedCases : 0, 209 | mapText: _mapText, 210 | textChanged: _textChanged, 211 | ), 212 | ), 213 | GestureDetector( 214 | onTap: () { 215 | if (_endpointsData != null) { 216 | Navigator.push(context, MaterialPageRoute(builder: (_) { 217 | return MapScreen( 218 | endpointsData: _endpointsData.recovered, 219 | latitude: _latitude, 220 | longitude: _longitude, 221 | assetName: 'assets/icons/img_deaths_marker2.png', 222 | confirmed: false, 223 | recovered: true, 224 | deaths: false, 225 | title: 'Recovered', 226 | ); 227 | })); 228 | } 229 | }, 230 | child: GlobalStatsCard( 231 | title: 'Total Recovered', 232 | color: color_for_recovered, 233 | assetName: 'assets/icons/patient.png', 234 | value: 235 | _overallRecoveredCases != null ? _overallRecoveredCases : 0, 236 | mapText: _mapText, 237 | textChanged: _textChanged, 238 | rateDisplay: rateDisplay( 239 | context, 240 | _overallRecoveredCases, 241 | _overallConfirmedCases, 242 | 'Recovery Rate', 243 | color_for_recovered, 244 | textStyleForRate, 245 | true), 246 | ), 247 | ), 248 | GestureDetector( 249 | onTap: () { 250 | if (_endpointsData != null) { 251 | Navigator.push(context, MaterialPageRoute(builder: (_) { 252 | return MapScreen( 253 | endpointsData: _endpointsData.deaths, 254 | latitude: _latitude, 255 | longitude: _longitude, 256 | assetName: 'assets/icons/img_deaths_marker3.png', 257 | confirmed: false, 258 | recovered: false, 259 | deaths: true, 260 | title: 'Death', 261 | ); 262 | })); 263 | } 264 | }, 265 | child: GlobalStatsCard( 266 | title: 'Total Deaths', 267 | color: color_for_deaths, 268 | assetName: 'assets/icons/death.png', 269 | value: _overallDeaths != null ? _overallDeaths : 0, 270 | mapText: _mapText, 271 | textChanged: _textChanged, 272 | rateDisplay: rateDisplay( 273 | context, 274 | _overallDeaths, 275 | _overallConfirmedCases, 276 | 'Fatality Rate', 277 | color_for_deaths, 278 | textStyleForRate, 279 | true), 280 | ), 281 | ), 282 | Column( 283 | crossAxisAlignment: CrossAxisAlignment.start, 284 | mainAxisAlignment: MainAxisAlignment.end, 285 | children: [ 286 | _countryData != null 287 | ? CountryCard( 288 | countryData: _countryData, 289 | countryName: _countryName, 290 | color1: color_for_active, 291 | color2: color_for_confirmed, 292 | color3: color_for_recovered, 293 | color4: color_for_deaths, 294 | rateDisplay1: rateDisplay( 295 | context, 296 | _countryData.recovered['value'], 297 | _countryData.confirmed['value'], 298 | 'Recovery Rate', 299 | color_for_recovered, 300 | textStyleForRate, 301 | false), 302 | rateDisplay2: rateDisplay( 303 | context, 304 | _countryData.deaths['value'], 305 | _countryData.confirmed['value'], 306 | 'Fatality Rate', 307 | color_for_deaths, 308 | textStyleForRate, 309 | false), 310 | ) 311 | : Center( 312 | child: Padding( 313 | padding: const EdgeInsets.symmetric(vertical: 135.0), 314 | child: CircularProgressIndicator(), 315 | )), 316 | Padding( 317 | padding: const EdgeInsets.symmetric(horizontal: 12.0), 318 | child: RaisedButton( 319 | onPressed: () { 320 | if (_endpointsData != null) { 321 | Navigator.of(context) 322 | .push(MaterialPageRoute(builder: (_) { 323 | return DailyUpdates( 324 | dailyUpdates: _endpointsData.dailyUpdates, 325 | color1: color_for_confirmed, 326 | color2: color_for_deaths, 327 | ); 328 | })); 329 | } 330 | }, 331 | child: (Text(_endpointsData != null 332 | ? 'Daily Updates' 333 | : 'Loading ...')), 334 | color: tertiaryColor, 335 | ), 336 | ), 337 | Padding( 338 | padding: const EdgeInsets.symmetric( 339 | horizontal: 12.0, vertical: 4.0), 340 | child: Text('Data source: https://covid19.mathdro.id/api', 341 | style: Theme.of(context).textTheme.caption), 342 | ) 343 | ], 344 | ) 345 | ], 346 | ), 347 | ), 348 | floatingActionButton: FloatingActionButton( 349 | backgroundColor: tertiaryColor, 350 | onPressed: () { 351 | if (_countries != null) { 352 | showCountriesList( 353 | context: context, 354 | countries: _countries, 355 | selectedCountry: updateCountry); 356 | } 357 | }, 358 | child: Icon( 359 | Icons.public, 360 | size: 48, 361 | color: Colors.white, 362 | ), 363 | ), 364 | ); 365 | } 366 | } 367 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | _fe_analyzer_shared: 5 | dependency: transitive 6 | description: 7 | name: _fe_analyzer_shared 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.1.0" 11 | analyzer: 12 | dependency: transitive 13 | description: 14 | name: analyzer 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "0.39.6" 18 | archive: 19 | dependency: transitive 20 | description: 21 | name: archive 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.13" 25 | args: 26 | dependency: transitive 27 | description: 28 | name: args 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.6.0" 32 | async: 33 | dependency: transitive 34 | description: 35 | name: async 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.4.1" 39 | boolean_selector: 40 | dependency: transitive 41 | description: 42 | name: boolean_selector 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "2.0.0" 46 | build: 47 | dependency: transitive 48 | description: 49 | name: build 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.2.2" 53 | build_config: 54 | dependency: transitive 55 | description: 56 | name: build_config 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "0.4.2" 60 | build_daemon: 61 | dependency: transitive 62 | description: 63 | name: build_daemon 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.1.4" 67 | build_resolvers: 68 | dependency: transitive 69 | description: 70 | name: build_resolvers 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.3.4" 74 | build_runner: 75 | dependency: "direct dev" 76 | description: 77 | name: build_runner 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.8.1" 81 | build_runner_core: 82 | dependency: transitive 83 | description: 84 | name: build_runner_core 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "5.0.0" 88 | built_collection: 89 | dependency: transitive 90 | description: 91 | name: built_collection 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "4.3.2" 95 | built_value: 96 | dependency: transitive 97 | description: 98 | name: built_value 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "7.0.9" 102 | cached_network_image: 103 | dependency: "direct main" 104 | description: 105 | name: cached_network_image 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "2.1.0+1" 109 | charcode: 110 | dependency: transitive 111 | description: 112 | name: charcode 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "1.1.3" 116 | checked_yaml: 117 | dependency: transitive 118 | description: 119 | name: checked_yaml 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "1.0.2" 123 | clock: 124 | dependency: transitive 125 | description: 126 | name: clock 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.0.1" 130 | code_builder: 131 | dependency: transitive 132 | description: 133 | name: code_builder 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "3.2.1" 137 | collection: 138 | dependency: transitive 139 | description: 140 | name: collection 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "1.14.12" 144 | convert: 145 | dependency: transitive 146 | description: 147 | name: convert 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "2.1.1" 151 | crypto: 152 | dependency: transitive 153 | description: 154 | name: crypto 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "2.1.4" 158 | csslib: 159 | dependency: transitive 160 | description: 161 | name: csslib 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "0.16.1" 165 | cupertino_icons: 166 | dependency: "direct main" 167 | description: 168 | name: cupertino_icons 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "0.1.3" 172 | dart_style: 173 | dependency: transitive 174 | description: 175 | name: dart_style 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "1.3.4" 179 | file: 180 | dependency: transitive 181 | description: 182 | name: file 183 | url: "https://pub.dartlang.org" 184 | source: hosted 185 | version: "5.1.0" 186 | fixnum: 187 | dependency: transitive 188 | description: 189 | name: fixnum 190 | url: "https://pub.dartlang.org" 191 | source: hosted 192 | version: "0.10.11" 193 | fl_chart: 194 | dependency: "direct main" 195 | description: 196 | name: fl_chart 197 | url: "https://pub.dartlang.org" 198 | source: hosted 199 | version: "0.8.7" 200 | flutter: 201 | dependency: "direct main" 202 | description: flutter 203 | source: sdk 204 | version: "0.0.0" 205 | flutter_cache_manager: 206 | dependency: transitive 207 | description: 208 | name: flutter_cache_manager 209 | url: "https://pub.dartlang.org" 210 | source: hosted 211 | version: "1.2.1" 212 | flutter_launcher_icons: 213 | dependency: "direct dev" 214 | description: 215 | name: flutter_launcher_icons 216 | url: "https://pub.dartlang.org" 217 | source: hosted 218 | version: "0.7.4" 219 | flutter_plugin_android_lifecycle: 220 | dependency: transitive 221 | description: 222 | name: flutter_plugin_android_lifecycle 223 | url: "https://pub.dartlang.org" 224 | source: hosted 225 | version: "1.0.6" 226 | flutter_test: 227 | dependency: "direct dev" 228 | description: flutter 229 | source: sdk 230 | version: "0.0.0" 231 | glob: 232 | dependency: transitive 233 | description: 234 | name: glob 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "1.2.0" 238 | google_maps_flutter: 239 | dependency: "direct main" 240 | description: 241 | name: google_maps_flutter 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "0.5.25+3" 245 | graphs: 246 | dependency: transitive 247 | description: 248 | name: graphs 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "0.2.0" 252 | html: 253 | dependency: transitive 254 | description: 255 | name: html 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "0.14.0+3" 259 | http: 260 | dependency: "direct main" 261 | description: 262 | name: http 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "0.12.0+4" 266 | http_multi_server: 267 | dependency: transitive 268 | description: 269 | name: http_multi_server 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "2.2.0" 273 | http_parser: 274 | dependency: transitive 275 | description: 276 | name: http_parser 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "3.1.4" 280 | image: 281 | dependency: transitive 282 | description: 283 | name: image 284 | url: "https://pub.dartlang.org" 285 | source: hosted 286 | version: "2.1.12" 287 | intl: 288 | dependency: "direct main" 289 | description: 290 | name: intl 291 | url: "https://pub.dartlang.org" 292 | source: hosted 293 | version: "0.16.1" 294 | io: 295 | dependency: transitive 296 | description: 297 | name: io 298 | url: "https://pub.dartlang.org" 299 | source: hosted 300 | version: "0.3.4" 301 | js: 302 | dependency: transitive 303 | description: 304 | name: js 305 | url: "https://pub.dartlang.org" 306 | source: hosted 307 | version: "0.6.1+1" 308 | json_annotation: 309 | dependency: "direct main" 310 | description: 311 | name: json_annotation 312 | url: "https://pub.dartlang.org" 313 | source: hosted 314 | version: "3.0.1" 315 | json_serializable: 316 | dependency: "direct dev" 317 | description: 318 | name: json_serializable 319 | url: "https://pub.dartlang.org" 320 | source: hosted 321 | version: "3.3.0" 322 | logging: 323 | dependency: transitive 324 | description: 325 | name: logging 326 | url: "https://pub.dartlang.org" 327 | source: hosted 328 | version: "0.11.4" 329 | matcher: 330 | dependency: transitive 331 | description: 332 | name: matcher 333 | url: "https://pub.dartlang.org" 334 | source: hosted 335 | version: "0.12.6" 336 | meta: 337 | dependency: transitive 338 | description: 339 | name: meta 340 | url: "https://pub.dartlang.org" 341 | source: hosted 342 | version: "1.1.8" 343 | mime: 344 | dependency: transitive 345 | description: 346 | name: mime 347 | url: "https://pub.dartlang.org" 348 | source: hosted 349 | version: "0.9.6+3" 350 | nested: 351 | dependency: transitive 352 | description: 353 | name: nested 354 | url: "https://pub.dartlang.org" 355 | source: hosted 356 | version: "0.0.4" 357 | node_interop: 358 | dependency: transitive 359 | description: 360 | name: node_interop 361 | url: "https://pub.dartlang.org" 362 | source: hosted 363 | version: "1.0.3" 364 | node_io: 365 | dependency: transitive 366 | description: 367 | name: node_io 368 | url: "https://pub.dartlang.org" 369 | source: hosted 370 | version: "1.0.1+2" 371 | package_config: 372 | dependency: transitive 373 | description: 374 | name: package_config 375 | url: "https://pub.dartlang.org" 376 | source: hosted 377 | version: "1.9.3" 378 | path: 379 | dependency: transitive 380 | description: 381 | name: path 382 | url: "https://pub.dartlang.org" 383 | source: hosted 384 | version: "1.6.4" 385 | path_drawing: 386 | dependency: transitive 387 | description: 388 | name: path_drawing 389 | url: "https://pub.dartlang.org" 390 | source: hosted 391 | version: "0.4.1" 392 | path_parsing: 393 | dependency: transitive 394 | description: 395 | name: path_parsing 396 | url: "https://pub.dartlang.org" 397 | source: hosted 398 | version: "0.1.4" 399 | path_provider: 400 | dependency: transitive 401 | description: 402 | name: path_provider 403 | url: "https://pub.dartlang.org" 404 | source: hosted 405 | version: "1.6.5" 406 | path_provider_macos: 407 | dependency: transitive 408 | description: 409 | name: path_provider_macos 410 | url: "https://pub.dartlang.org" 411 | source: hosted 412 | version: "0.0.4" 413 | path_provider_platform_interface: 414 | dependency: transitive 415 | description: 416 | name: path_provider_platform_interface 417 | url: "https://pub.dartlang.org" 418 | source: hosted 419 | version: "1.0.1" 420 | pedantic: 421 | dependency: transitive 422 | description: 423 | name: pedantic 424 | url: "https://pub.dartlang.org" 425 | source: hosted 426 | version: "1.9.0" 427 | petitparser: 428 | dependency: transitive 429 | description: 430 | name: petitparser 431 | url: "https://pub.dartlang.org" 432 | source: hosted 433 | version: "3.0.2" 434 | platform: 435 | dependency: transitive 436 | description: 437 | name: platform 438 | url: "https://pub.dartlang.org" 439 | source: hosted 440 | version: "2.2.1" 441 | plugin_platform_interface: 442 | dependency: transitive 443 | description: 444 | name: plugin_platform_interface 445 | url: "https://pub.dartlang.org" 446 | source: hosted 447 | version: "1.0.2" 448 | pool: 449 | dependency: transitive 450 | description: 451 | name: pool 452 | url: "https://pub.dartlang.org" 453 | source: hosted 454 | version: "1.4.0" 455 | provider: 456 | dependency: "direct main" 457 | description: 458 | name: provider 459 | url: "https://pub.dartlang.org" 460 | source: hosted 461 | version: "4.0.4" 462 | pub_semver: 463 | dependency: transitive 464 | description: 465 | name: pub_semver 466 | url: "https://pub.dartlang.org" 467 | source: hosted 468 | version: "1.4.4" 469 | pubspec_parse: 470 | dependency: transitive 471 | description: 472 | name: pubspec_parse 473 | url: "https://pub.dartlang.org" 474 | source: hosted 475 | version: "0.1.5" 476 | quiver: 477 | dependency: transitive 478 | description: 479 | name: quiver 480 | url: "https://pub.dartlang.org" 481 | source: hosted 482 | version: "2.1.3" 483 | rxdart: 484 | dependency: transitive 485 | description: 486 | name: rxdart 487 | url: "https://pub.dartlang.org" 488 | source: hosted 489 | version: "0.23.1" 490 | shelf: 491 | dependency: transitive 492 | description: 493 | name: shelf 494 | url: "https://pub.dartlang.org" 495 | source: hosted 496 | version: "0.7.5" 497 | shelf_web_socket: 498 | dependency: transitive 499 | description: 500 | name: shelf_web_socket 501 | url: "https://pub.dartlang.org" 502 | source: hosted 503 | version: "0.2.3" 504 | sky_engine: 505 | dependency: transitive 506 | description: flutter 507 | source: sdk 508 | version: "0.0.99" 509 | source_gen: 510 | dependency: transitive 511 | description: 512 | name: source_gen 513 | url: "https://pub.dartlang.org" 514 | source: hosted 515 | version: "0.9.5" 516 | source_span: 517 | dependency: transitive 518 | description: 519 | name: source_span 520 | url: "https://pub.dartlang.org" 521 | source: hosted 522 | version: "1.7.0" 523 | sqflite: 524 | dependency: transitive 525 | description: 526 | name: sqflite 527 | url: "https://pub.dartlang.org" 528 | source: hosted 529 | version: "1.3.0" 530 | sqflite_common: 531 | dependency: transitive 532 | description: 533 | name: sqflite_common 534 | url: "https://pub.dartlang.org" 535 | source: hosted 536 | version: "1.0.0+1" 537 | stack_trace: 538 | dependency: transitive 539 | description: 540 | name: stack_trace 541 | url: "https://pub.dartlang.org" 542 | source: hosted 543 | version: "1.9.3" 544 | stream_channel: 545 | dependency: transitive 546 | description: 547 | name: stream_channel 548 | url: "https://pub.dartlang.org" 549 | source: hosted 550 | version: "2.0.0" 551 | stream_transform: 552 | dependency: transitive 553 | description: 554 | name: stream_transform 555 | url: "https://pub.dartlang.org" 556 | source: hosted 557 | version: "1.2.0" 558 | string_scanner: 559 | dependency: transitive 560 | description: 561 | name: string_scanner 562 | url: "https://pub.dartlang.org" 563 | source: hosted 564 | version: "1.0.5" 565 | synchronized: 566 | dependency: transitive 567 | description: 568 | name: synchronized 569 | url: "https://pub.dartlang.org" 570 | source: hosted 571 | version: "2.2.0" 572 | term_glyph: 573 | dependency: transitive 574 | description: 575 | name: term_glyph 576 | url: "https://pub.dartlang.org" 577 | source: hosted 578 | version: "1.1.0" 579 | test_api: 580 | dependency: transitive 581 | description: 582 | name: test_api 583 | url: "https://pub.dartlang.org" 584 | source: hosted 585 | version: "0.2.15" 586 | timing: 587 | dependency: transitive 588 | description: 589 | name: timing 590 | url: "https://pub.dartlang.org" 591 | source: hosted 592 | version: "0.1.1+2" 593 | typed_data: 594 | dependency: transitive 595 | description: 596 | name: typed_data 597 | url: "https://pub.dartlang.org" 598 | source: hosted 599 | version: "1.1.6" 600 | uuid: 601 | dependency: transitive 602 | description: 603 | name: uuid 604 | url: "https://pub.dartlang.org" 605 | source: hosted 606 | version: "2.0.4" 607 | vector_math: 608 | dependency: transitive 609 | description: 610 | name: vector_math 611 | url: "https://pub.dartlang.org" 612 | source: hosted 613 | version: "2.0.8" 614 | watcher: 615 | dependency: transitive 616 | description: 617 | name: watcher 618 | url: "https://pub.dartlang.org" 619 | source: hosted 620 | version: "0.9.7+14" 621 | web_socket_channel: 622 | dependency: transitive 623 | description: 624 | name: web_socket_channel 625 | url: "https://pub.dartlang.org" 626 | source: hosted 627 | version: "1.1.0" 628 | xml: 629 | dependency: transitive 630 | description: 631 | name: xml 632 | url: "https://pub.dartlang.org" 633 | source: hosted 634 | version: "3.7.0" 635 | yaml: 636 | dependency: transitive 637 | description: 638 | name: yaml 639 | url: "https://pub.dartlang.org" 640 | source: hosted 641 | version: "2.2.0" 642 | sdks: 643 | dart: ">=2.7.0 <3.0.0" 644 | flutter: ">=1.12.13+hotfix.5 <2.0.0" 645 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 97C146F11CF9000F007C117D /* Supporting Files */, 94 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 95 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 96 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 97 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 98 | ); 99 | path = Runner; 100 | sourceTree = ""; 101 | }; 102 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | ); 106 | name = "Supporting Files"; 107 | sourceTree = ""; 108 | }; 109 | /* End PBXGroup section */ 110 | 111 | /* Begin PBXNativeTarget section */ 112 | 97C146ED1CF9000F007C117D /* Runner */ = { 113 | isa = PBXNativeTarget; 114 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 115 | buildPhases = ( 116 | 9740EEB61CF901F6004384FC /* Run Script */, 117 | 97C146EA1CF9000F007C117D /* Sources */, 118 | 97C146EB1CF9000F007C117D /* Frameworks */, 119 | 97C146EC1CF9000F007C117D /* Resources */, 120 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 121 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 122 | ); 123 | buildRules = ( 124 | ); 125 | dependencies = ( 126 | ); 127 | name = Runner; 128 | productName = Runner; 129 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 130 | productType = "com.apple.product-type.application"; 131 | }; 132 | /* End PBXNativeTarget section */ 133 | 134 | /* Begin PBXProject section */ 135 | 97C146E61CF9000F007C117D /* Project object */ = { 136 | isa = PBXProject; 137 | attributes = { 138 | LastUpgradeCheck = 1020; 139 | ORGANIZATIONNAME = ""; 140 | TargetAttributes = { 141 | 97C146ED1CF9000F007C117D = { 142 | CreatedOnToolsVersion = 7.3.1; 143 | LastSwiftMigration = 1100; 144 | }; 145 | }; 146 | }; 147 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 148 | compatibilityVersion = "Xcode 9.3"; 149 | developmentRegion = en; 150 | hasScannedForEncodings = 0; 151 | knownRegions = ( 152 | en, 153 | Base, 154 | ); 155 | mainGroup = 97C146E51CF9000F007C117D; 156 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 157 | projectDirPath = ""; 158 | projectRoot = ""; 159 | targets = ( 160 | 97C146ED1CF9000F007C117D /* Runner */, 161 | ); 162 | }; 163 | /* End PBXProject section */ 164 | 165 | /* Begin PBXResourcesBuildPhase section */ 166 | 97C146EC1CF9000F007C117D /* Resources */ = { 167 | isa = PBXResourcesBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 171 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 172 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 173 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXResourcesBuildPhase section */ 178 | 179 | /* Begin PBXShellScriptBuildPhase section */ 180 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 181 | isa = PBXShellScriptBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | ); 185 | inputPaths = ( 186 | ); 187 | name = "Thin Binary"; 188 | outputPaths = ( 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | shellPath = /bin/sh; 192 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 193 | }; 194 | 9740EEB61CF901F6004384FC /* Run Script */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Run Script"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 207 | }; 208 | /* End PBXShellScriptBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | 97C146EA1CF9000F007C117D /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 216 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin PBXVariantGroup section */ 223 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C146FB1CF9000F007C117D /* Base */, 227 | ); 228 | name = Main.storyboard; 229 | sourceTree = ""; 230 | }; 231 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 97C147001CF9000F007C117D /* Base */, 235 | ); 236 | name = LaunchScreen.storyboard; 237 | sourceTree = ""; 238 | }; 239 | /* End PBXVariantGroup section */ 240 | 241 | /* Begin XCBuildConfiguration section */ 242 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 243 | isa = XCBuildConfiguration; 244 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_ANALYZER_NONNULL = YES; 248 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 249 | CLANG_CXX_LIBRARY = "libc++"; 250 | CLANG_ENABLE_MODULES = YES; 251 | CLANG_ENABLE_OBJC_ARC = YES; 252 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 253 | CLANG_WARN_BOOL_CONVERSION = YES; 254 | CLANG_WARN_COMMA = YES; 255 | CLANG_WARN_CONSTANT_CONVERSION = YES; 256 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 258 | CLANG_WARN_EMPTY_BODY = YES; 259 | CLANG_WARN_ENUM_CONVERSION = YES; 260 | CLANG_WARN_INFINITE_RECURSION = YES; 261 | CLANG_WARN_INT_CONVERSION = YES; 262 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 263 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 264 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 266 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 267 | CLANG_WARN_STRICT_PROTOTYPES = YES; 268 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 269 | CLANG_WARN_UNREACHABLE_CODE = YES; 270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 271 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 272 | COPY_PHASE_STRIP = NO; 273 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 274 | ENABLE_NS_ASSERTIONS = NO; 275 | ENABLE_STRICT_OBJC_MSGSEND = YES; 276 | GCC_C_LANGUAGE_STANDARD = gnu99; 277 | GCC_NO_COMMON_BLOCKS = YES; 278 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 279 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 280 | GCC_WARN_UNDECLARED_SELECTOR = YES; 281 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 282 | GCC_WARN_UNUSED_FUNCTION = YES; 283 | GCC_WARN_UNUSED_VARIABLE = YES; 284 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 285 | MTL_ENABLE_DEBUG_INFO = NO; 286 | SDKROOT = iphoneos; 287 | SUPPORTED_PLATFORMS = iphoneos; 288 | TARGETED_DEVICE_FAMILY = "1,2"; 289 | VALIDATE_PRODUCT = YES; 290 | }; 291 | name = Profile; 292 | }; 293 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 294 | isa = XCBuildConfiguration; 295 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 296 | buildSettings = { 297 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 298 | CLANG_ENABLE_MODULES = YES; 299 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 300 | ENABLE_BITCODE = NO; 301 | FRAMEWORK_SEARCH_PATHS = ( 302 | "$(inherited)", 303 | "$(PROJECT_DIR)/Flutter", 304 | ); 305 | INFOPLIST_FILE = Runner/Info.plist; 306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 307 | LIBRARY_SEARCH_PATHS = ( 308 | "$(inherited)", 309 | "$(PROJECT_DIR)/Flutter", 310 | ); 311 | PRODUCT_BUNDLE_IDENTIFIER = com.example.coronavirusCovid19Tracker; 312 | PRODUCT_NAME = "$(TARGET_NAME)"; 313 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 314 | SWIFT_VERSION = 5.0; 315 | VERSIONING_SYSTEM = "apple-generic"; 316 | }; 317 | name = Profile; 318 | }; 319 | 97C147031CF9000F007C117D /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 322 | buildSettings = { 323 | ALWAYS_SEARCH_USER_PATHS = NO; 324 | CLANG_ANALYZER_NONNULL = YES; 325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 326 | CLANG_CXX_LIBRARY = "libc++"; 327 | CLANG_ENABLE_MODULES = YES; 328 | CLANG_ENABLE_OBJC_ARC = YES; 329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_COMMA = YES; 332 | CLANG_WARN_CONSTANT_CONVERSION = YES; 333 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 341 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 344 | CLANG_WARN_STRICT_PROTOTYPES = YES; 345 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 346 | CLANG_WARN_UNREACHABLE_CODE = YES; 347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 348 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 349 | COPY_PHASE_STRIP = NO; 350 | DEBUG_INFORMATION_FORMAT = dwarf; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | ENABLE_TESTABILITY = YES; 353 | GCC_C_LANGUAGE_STANDARD = gnu99; 354 | GCC_DYNAMIC_NO_PIC = NO; 355 | GCC_NO_COMMON_BLOCKS = YES; 356 | GCC_OPTIMIZATION_LEVEL = 0; 357 | GCC_PREPROCESSOR_DEFINITIONS = ( 358 | "DEBUG=1", 359 | "$(inherited)", 360 | ); 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 368 | MTL_ENABLE_DEBUG_INFO = YES; 369 | ONLY_ACTIVE_ARCH = YES; 370 | SDKROOT = iphoneos; 371 | TARGETED_DEVICE_FAMILY = "1,2"; 372 | }; 373 | name = Debug; 374 | }; 375 | 97C147041CF9000F007C117D /* Release */ = { 376 | isa = XCBuildConfiguration; 377 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 378 | buildSettings = { 379 | ALWAYS_SEARCH_USER_PATHS = NO; 380 | CLANG_ANALYZER_NONNULL = YES; 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 382 | CLANG_CXX_LIBRARY = "libc++"; 383 | CLANG_ENABLE_MODULES = YES; 384 | CLANG_ENABLE_OBJC_ARC = YES; 385 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_COMMA = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 399 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 400 | CLANG_WARN_STRICT_PROTOTYPES = YES; 401 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 402 | CLANG_WARN_UNREACHABLE_CODE = YES; 403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 405 | COPY_PHASE_STRIP = NO; 406 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 407 | ENABLE_NS_ASSERTIONS = NO; 408 | ENABLE_STRICT_OBJC_MSGSEND = YES; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_NO_COMMON_BLOCKS = YES; 411 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 412 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 413 | GCC_WARN_UNDECLARED_SELECTOR = YES; 414 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 415 | GCC_WARN_UNUSED_FUNCTION = YES; 416 | GCC_WARN_UNUSED_VARIABLE = YES; 417 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 418 | MTL_ENABLE_DEBUG_INFO = NO; 419 | SDKROOT = iphoneos; 420 | SUPPORTED_PLATFORMS = iphoneos; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 422 | TARGETED_DEVICE_FAMILY = "1,2"; 423 | VALIDATE_PRODUCT = YES; 424 | }; 425 | name = Release; 426 | }; 427 | 97C147061CF9000F007C117D /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | FRAMEWORK_SEARCH_PATHS = ( 436 | "$(inherited)", 437 | "$(PROJECT_DIR)/Flutter", 438 | ); 439 | INFOPLIST_FILE = Runner/Info.plist; 440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 441 | LIBRARY_SEARCH_PATHS = ( 442 | "$(inherited)", 443 | "$(PROJECT_DIR)/Flutter", 444 | ); 445 | PRODUCT_BUNDLE_IDENTIFIER = com.example.coronavirusCovid19Tracker; 446 | PRODUCT_NAME = "$(TARGET_NAME)"; 447 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 448 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 449 | SWIFT_VERSION = 5.0; 450 | VERSIONING_SYSTEM = "apple-generic"; 451 | }; 452 | name = Debug; 453 | }; 454 | 97C147071CF9000F007C117D /* Release */ = { 455 | isa = XCBuildConfiguration; 456 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 457 | buildSettings = { 458 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 459 | CLANG_ENABLE_MODULES = YES; 460 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 461 | ENABLE_BITCODE = NO; 462 | FRAMEWORK_SEARCH_PATHS = ( 463 | "$(inherited)", 464 | "$(PROJECT_DIR)/Flutter", 465 | ); 466 | INFOPLIST_FILE = Runner/Info.plist; 467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 468 | LIBRARY_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "$(PROJECT_DIR)/Flutter", 471 | ); 472 | PRODUCT_BUNDLE_IDENTIFIER = com.example.coronavirusCovid19Tracker; 473 | PRODUCT_NAME = "$(TARGET_NAME)"; 474 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 475 | SWIFT_VERSION = 5.0; 476 | VERSIONING_SYSTEM = "apple-generic"; 477 | }; 478 | name = Release; 479 | }; 480 | /* End XCBuildConfiguration section */ 481 | 482 | /* Begin XCConfigurationList section */ 483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | 97C147031CF9000F007C117D /* Debug */, 487 | 97C147041CF9000F007C117D /* Release */, 488 | 249021D3217E4FDB00AE95B9 /* Profile */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | 97C147061CF9000F007C117D /* Debug */, 497 | 97C147071CF9000F007C117D /* Release */, 498 | 249021D4217E4FDB00AE95B9 /* Profile */, 499 | ); 500 | defaultConfigurationIsVisible = 0; 501 | defaultConfigurationName = Release; 502 | }; 503 | /* End XCConfigurationList section */ 504 | }; 505 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 506 | } 507 | --------------------------------------------------------------------------------