Giter Site home page Giter Site logo

weather_app's Introduction

weather_app

A new Flutter project, using Open Weather Api to make an weather forecast app.

Some images illustrating this app

In use libraries:

  • http: ^1.0.0
  • flutter_dotenv: ^5.1.0

Take note.

  1. To build release version using API calls, need to add the declaration
<uses-permission android:name="android.permission.INTERNET" />

into android/app/src/main/AndroidManifest.xml file. Things will look like this:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.weather_app">
    <uses-permission android:name="android.permission.INTERNET" />
   <application
        android:label="weather_app"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
  1. New Widgets: ColorFiltered

  2. dt (DateTime) in response of Open Weather API need to be converted into normal date by using the following assign command

int getHourFromDt(num weatherDt) {
  final validTime = int.parse(weatherDt.toString());
  final date = DateTime.fromMillisecondsSinceEpoch(validTime * 1000);
  return date.hour;
}

int getWeekDayFromDt(num weatherDt) {
  final validTime = int.parse(weatherDt.toString());
  final date = DateTime.fromMillisecondsSinceEpoch(validTime * 1000);
  return date.weekday;
}
  1. Sign in and sign up process to get API_KEY in Open Weather Page required for a few days.

  2. Using your own API_KEY, longtitude and latitude, writing them inside .env file (with format the same as in .env.example file), then run the following command:

weather_app$ flutter run --release
  1. ENJOY

weather_app's People

Contributors

tuanvu9981 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.