Skip to content

Current weather mobile app developer in Flutter

Notifications You must be signed in to change notification settings

mszakacz/weather

Repository files navigation

Weather Mobile App

App Overview

Mobile app presents Weather Forecast for 5 next days.

Screenshot 2024-05-28 at 12 47 29 Screenshot 2024-05-28 at 12 47 04

API KEY

Weather API Key

  1. Get your own API Key from https://openweathermap.org/api OpenWeatherMap
  2. Create api_keys.json at the very top level of the project and store there the API Key
{
    "WEATHER_API_KEY": "< your_API_KEY >"
}
  1. Use --dart-define to pass the API Key to the build e.g: flutter run --dart-define-from-file=api_keys.json

  2. Make sure that api_keys.json is added to .gitignore

  3. And/Or add it to your build configuration:

{
      "name": "Launch development",
      "request": "launch",
      "type": "dart",
      "program": "lib/main_development.dart",
      "args": [
        "--flavor",
        "development",
        "--target",
        "lib/main_development.dart"
      ],
      "toolArgs": [
        "--dart-define-from-file=api_keys.json"
      ]
    }

Build the app

iOS Release Production

flutter build ipa --release lib/main_production.dart --dart-define-from-file=api_keys.json

Android Release Production

flutter build aab --release lib/main_production.dart --dart-define-from-file=api_keys.json

iOS Debug Development

flutter build ipa --debug lib/main_development.dart --dart-define-from-file=api_keys.json

Android Debug Development

flutter build aab --debug lib/main_development.dart --dart-define-from-file=api_keys.json


Test

To test the app and all packages simply run flutter test . packages/*


Weather API docs

https://openweathermap.org/forecast5

About

Current weather mobile app developer in Flutter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published