1
0
mirror of https://github.com/nisrulz/flutter-examples.git synced 2026-08-25 01:05:36 +00:00
Files
flutter-examples/covid19_mobile_app
Nishant Srivastava 5c53498119 refactor: standardize Dart and Android config across all 54 apps
- Bump all apps to sdk >=3.0.0 <4.0.0 and add flutter_lints + a shared
  analysis_options.yaml to every app (flutter analyze is now green repo-wide)
- Fix real compile errors in firebase_google_authentication and image_editor,
  plus deprecated APIs (Matrix4, SvgPicture.color, textScaleFactor),
  missing async 'mounted' guards, and misc lints via dart fix + manual fixes
- Align pubspec 'name' with each folder and Android namespace/applicationId
  with the documented github.nisrulz.* convention
- Convert bmi_calculator from a legacy Flutter module to a standard app
  with a proper android/ scaffold; fix missing android:exported in launcher
  manifests across 22 apps so all Android builds pass
- Untrack generated build files (GeneratedPluginRegistrant,
  .flutter-plugins-dependencies) and ignore them
2026-08-17 17:26:39 +02:00
..

Covid-19 Mobile App

Mobile app to get information about covid-19 cases. Link to the API used: https://documenter.getpostman.com/view/8854915/SzS7R6uu?version=latest

Before runnning the application, run the following command:

flutter pub get

You can then run the project with the following command:

flutter run

Just to ensure that the app works perfectly, add the following permission in AndroidManifest.xml file:

<uses-permission android:name="android.permission.INTERNET" />

By default the app shows Corona Virus cases in India on the home page. You can change the country name in variable url2 to show the cases in other coountries or maybe get the location of the user and show accordingly.

The packages used in this project are as follows:

  1. number_display - to display data in a width-limited component. For eg: it converts 2500000 to 2.5M

  2. http - to send http requests to the API

  3. bezier_chart - to visualize the received data from the API

  4. folding_cell - to display a foldable cell to view details(total deaths, today cases, etc.). This foldable cell is present in 'Affected Countries' page

Images are present in the assets folder

Files present in this project along with their purposes are given below:

resources/fetch_data_functions.dart - contains functions to fetch data from the api(NovelCOVID API).

screens/home.dart - shows Covid-19 cases of the whole world(all coutries together) and includes visualization of the cases in India(you can change the country by changing the url).

screens/countrylist.dart - shows Covid-19 cases, country wise, in the form of a list. Each cell in the list is foldable. Upon expanding the cell, more info is shown.

screens/searchCountry.dart - similar to screens/countrylist.dart but here user can also search.

widgets/drawer.dart - contains the side drawer code

widgets/foldable_cell_widgets.dart - contains reusable front, inner top and inner bottom widgets of the foldable cell that are used in screens/countrylist.dart and screens/searchCountry.dart.

widgets/graph.dart - contains the code for building the graph.

widgets/info_card.dart - contains the code for displaying rounded retangular cards on the home page.

Screenshots