Skip to content

Flutter Weather App using OpenWeatherMap API and Bloc Pattern.

License

Notifications You must be signed in to change notification settings

ShokhrukhbekYuldoshev/Weather

Repository files navigation

Weather

Flutter Weather App using OpenWeatherMap API and Bloc Pattern.

📱 Platforms

Android iOS Web MacOS Linux Windows
✔️ ✔️ ✔️ ✔️ ✖️ ✖️

📸 Screenshots

Splash Login
Splash Login
Register Home
Register Home

📚 Dependencies

Name Version Description
firebase_core 2.15.1 Flutter plugin for Firebase Core, enabling connecting to multiple Firebase apps.
firebase_auth 4.7.3 Flutter plugin for Firebase Auth, enabling Android and iOS authentication using passwords, phone numbers and identity providers like Google, Facebook and Twitter.
geolocator 10.0.0 A Flutter geolocation plugin which provides easy access to platform specific location services.
dio 5.3.2 A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.
flutter_svg 2.0.7 An SVG rendering and widget library for Flutter, which allows painting and displaying Scalable Vector Graphics 1.1 files.
bloc 8.1.2 A predictable state management library that helps implement the BLoC (Business Logic Component) design pattern.
flutter_bloc 8.1.3 Widgets that make it easy to integrate blocs and cubits into Flutter. Built to work with package:bloc.
intl 0.18.1 Contains code to deal with internationalized/localized messages, date and number formatting and parsing, bi-directional text, and other internationalization issues.
hive 2.2.3 Hive is a lightweight and blazing fast key-value database written in pure Dart.
hive_flutter 1.1.0 Hive is a lightweight and blazing fast key-value database written in pure Dart.

📦 Installation

Prerequisites

Building and running

In order to build and run the project, follow these steps:

  1. Clone the project
git clone https://github.com/shokhrukhbekyuldoshev/weather.git
  1. Open the project
cd weather
  1. Add your OpenWeatherMap API key to the lib/secrets.dart file.
const String openWeatherMapApiKey = {YOUR_API_KEY};
  1. Create a Flutter project on Firebase console and follow the instructions to add Firebase to your Flutter app.

  2. Enable Email/Password sign-in method on Firebase console.

  3. Install dependencies

dart pub get
  1. Run the app
flutter run

❗️Permissions

Android

Before running the project, you need to add the following permissions to the AndroidManifest.xml file located in the android/app/src/main directory.

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

iOS

Before running the project, you need to add the following permissions to the Info.plist file located in the ios/Runner directory.

<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location when open.</string>

MacOS

  1. Before running the project, you need to add the following permissions to the Info.plist file located in the macos/Runner directory.
  <key>NSLocationWhenInUseUsageDescription</key>
  <string>This app needs access to location when open.</string>
  1. Add the following permissions to the macos/Runner/DebugProfile.entitlements file.
  <key>com.apple.security.personal-information.location</key>
  <true />
  1. Add the following permissions to the macos/Runner/Release.entitlements file.
  <key>com.apple.security.personal-information.location</key>
  <true />

🤝 Contributing

Contributions, issues and feature requests are welcome!

📝 License

This project is MIT licensed.

👨‍💻 Author

Shokhrukhbek Yuldoshev