Making Http requests and Using Json in Dart's Flutter Framework

in #utopian-io6 years ago (edited)

What Will I Learn?

  • You will learn how to make a HTTP GET request in the Flutter framework to get information from an API
  • You will learn how to parse Json and then serve it to other parts of your Flutter application
  • You will learn how to build List Views and dynamic User Interfaces in Flutter
  • You will learn how to make use of the Hot Reload feature in Flutter for iterative development

Requirements

Difficulty

  • Intermediate

Description

In this video tutorial, we look at how we can make HTTP requests and Parse JSON from a Web API using Dart's Flutter Mobile Framework. Specifically, we look use an HTTP GET request to retrieve data from the Star Wars API, Swapi, which we then can serve onto a List View widget in our Flutter Application. This style of application is useful because it allows us to serve data without attaching a database to our application or hard-coding the date into our application. We can also make use of this method to retrieve data from external APIs such as the Google Maps API or any other public API service.

Our Application makes use of Dart's Async Isolates to call the HTTP request so that the User interface can render while the request is being made. If the request fails, the User interface still will render properly. The HTTP request grabs ten elements which populates our List View Widget and we can chose which properties we want to serve to our Front-End from the JSON. We also make use of Flutter's Hot Reload feature in this tutorial and show off the Flutter Visual Studio Code Extensions.

The Dart-Code Visual Studio Code Extension can be found here

The source code for this project can be found here

Video Tutorial

Curriculum



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Thank you for moderating my post.

Hey @ewq, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hey @tensor I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

I really like this post tensor!

I'm glad you enjoyed it.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 62860.75
ETH 3112.64
USDT 1.00
SBD 3.86