Skip to content

Commit

Permalink
final commit
Browse files Browse the repository at this point in the history
  • Loading branch information
osamanoor17 committed Jan 31, 2025
1 parent 5170e6e commit 7c1a25d
Show file tree
Hide file tree
Showing 8 changed files with 292 additions and 143 deletions.
79 changes: 77 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,77 @@
# Covid-19
Covid-19 Tracking Flutter App
# COVID-19 Flutter App

A Flutter-based mobile application that provides real-time data and statistics about the COVID-19 pandemic. This app includes global and country-specific information, interactive charts, and animated features for a smooth user experience.

## Features

- **Global COVID-19 Statistics**: View the current worldwide statistics for COVID-19 cases, deaths, and recoveries.
- **Country-specific Data**: Browse COVID-19 data for individual countries.
- **Interactive Pie Chart**: View a pie chart displaying the distribution of cases.
- **Animated Text**: Animated text elements to enhance user interaction.
- **Shimmer Effect**: Smooth loading effects while fetching data.
- **Real-time Data Fetching**: Data is pulled from online sources to keep it up-to-date.

## Project Structure

```
lib/
├── models/
│ └── WorldStatesModel.dart # Contains the data model for world states
├── services/
│ └── utils/
│ ├── app_url.dart # URL constants for API endpoints
│ └── states_services.dart # Handles API calls and data fetching
├── views/
│ ├── countries_list.dart # Displays the list of countries with COVID data
│ ├── details_screen.dart # Shows detailed data for a selected country
│ ├── splash_screen.dart # App launch screen
│ └── world_states.dart # Displays global COVID-19 statistics
├── main.dart # Main entry point of the application
└── pubspec.yaml # Project dependencies and configurations
```

## Packages Used

- **pie_chart**: A library for displaying interactive pie charts in Flutter.
- **http**: Makes HTTP requests to fetch COVID-19 data from an external API.
- **animated_text_kit**: Provides animated text effects for a dynamic UI.
- **flutter_spinkit**: A collection of loading indicators for Flutter.
- **shimmer**: Adds shimmer loading effects while fetching data.

## Installation

1. Clone this repository to your local machine:
```bash
git clone https://github.com/your-username/covid-19-flutter-app.git
```
2. Navigate into the project directory:
```bash
cd covid-19-flutter-app
```
3. Install the dependencies:
```bash
flutter pub get
```
4. Run the app:
```bash
flutter run
```

## Contributing

We welcome contributions to improve the app. To contribute:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature-name`).
3. Commit your changes (`git commit -am 'Add new feature'`).
4. Push to the branch (`git push origin feature-name`).
5. Open a pull request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

38 changes: 35 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,44 @@
//buildscript {
// ext.kotlin_version = '1.8.22'
// repositories {
// google()
// mavenCentral()
// }
//
// dependencies {
//// classpath 'com.android.tools.build:gradle:7.3.0'
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// }
//}
//
//allprojects {
// repositories {
// google()
// mavenCentral()
// }
//}
//
//rootProject.buildDir = '../build'
//subprojects {
// project.buildDir = "${rootProject.buildDir}/${project.name}"
//}
//subprojects {
// project.evaluationDependsOn(':app')
//}
//
//tasks.register("clean", Delete) {
// delete rootProject.buildDir
//}

buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.8.22'//update this
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:8.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -28,4 +60,4 @@ subprojects {

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
title: 'Covid-19',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
Expand Down
3 changes: 2 additions & 1 deletion lib/views/countries_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ class _CountriesListState extends State<CountriesList> {
return Scaffold(
backgroundColor: Colors.grey.shade100,
appBar: AppBar(
title: const Text("Countries List"),
elevation: 0,
backgroundColor: Colors.grey.shade100,
),
body: SafeArea(
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(16.0),
padding: const EdgeInsets.all(12.0),
child: TextFormField(
controller: _searchController,
decoration: InputDecoration(
Expand Down
7 changes: 4 additions & 3 deletions lib/views/details_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class DetailsScreen extends StatefulWidget {
test;

DetailsScreen(
{required this.image,
{super.key,
required this.image,
required this.name,
required this.totalCases,
required this.totalDeaths,
Expand All @@ -33,14 +34,14 @@ class _DetailsScreenState extends State<DetailsScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white70,
// backgroundColor: Colors.white70,
appBar: AppBar(title: Text(widget.name)),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: SingleChildScrollView(
child: Column(
children: [
SizedBox(
const SizedBox(
height: 30,
),
Stack(
Expand Down
Loading

0 comments on commit 7c1a25d

Please sign in to comment.