Flutter Weather App using OpenWeatherMap API and Bloc Pattern.
Android | iOS | Web | MacOS | Linux | Windows |
---|---|---|---|---|---|
✔️ | ✔️ | ✔️ | ✔️ | ✖️ | ✖️ |
Splash | Login |
---|---|
![]() |
![]() |
Register | Home |
---|---|
![]() |
![]() |
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. |
- Flutter
- Android Studio or Xcode
- Firebase for authentication
- OpenWeatherMap API key
In order to build and run the project, follow these steps:
- Clone the project
git clone https://github.com/shokhrukhbekyuldoshev/weather.git
- Open the project
cd weather
- Add your OpenWeatherMap API key to the
lib/secrets.dart
file.
const String openWeatherMapApiKey = {YOUR_API_KEY};
-
Create a Flutter project on Firebase console and follow the instructions to add Firebase to your Flutter app.
-
Enable Email/Password sign-in method on Firebase console.
-
Install dependencies
dart pub get
- Run the app
flutter run
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" />
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>
- Before running the project, you need to add the following permissions to the
Info.plist
file located in themacos/Runner
directory.
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location when open.</string>
- Add the following permissions to the
macos/Runner/DebugProfile.entitlements
file.
<key>com.apple.security.personal-information.location</key>
<true />
- Add the following permissions to the
macos/Runner/Release.entitlements
file.
<key>com.apple.security.personal-information.location</key>
<true />
Contributions, issues and feature requests are welcome!
This project is MIT licensed.
Shokhrukhbek Yuldoshev
- Github: @ShokhrukhbekYuldoshev
- Email: @shokhrukhbekdev@gmail.com