Building a Movie Searcher with RxDart and SQLite in Dart's Flutter Framework (Part 1)

in #utopian-io6 years ago (edited)

What Will I Learn?

  • You will learn how to dynamically get an API request and use a Debounce Observable
  • You will learn how to model data and use that data in a stream
  • You will learn how to use RxDart in a flutter project
  • You will learn how to use the Icon Button widget and the Publish Subject stream controller

Requirements

Difficulty

  • Intermediate

Description

In this video tutorial, we start building out a Movie Searcher application in Dart's Flutter Framework. This application makes use of the RxDart plugin, the Path Provider plugin and the SQLite Sqflite plugin. The overall design behind this application is to have a search bar which allows the user to query for movies. When the user enters an input into search bar, the application calls to the API which fetches a list of movies. The user will then have the ability to favorite or star a movie which will push it into the SQLite database and the user will also be able to click on the card which will expand it out to show more information about the movie to the user.

In this first part, we built out the model of our application. We also built out the internal logic for making the API request and fetching the list of movies. This part of the tutorial, featured some concepts from RxDart such as the Publish Subject stream controller and Debounce Observables. We use a Debounce Observable because it allows us to set a bit of time-lag between when the user types in a letter and when the API returns the list of times. The application will return more items in the list at once then if we were to handle the response in real time.

We also take a look at the main difference between using a Publish Subject instead of a simple stream controller. The Publish Subject allows us to return an observable which gives us various advantages that a stream controller does not have by default. For instance, Streams are pull-based and Observables are push-based. This simple idea has far reaching consequences in the concrete areas of our application. Observables also allow for multiple subscribers where as streams only allow for a single subscriber.

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]

Thanks as always for moderating my content.

Hey @redart, 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

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 64118.79
ETH 3390.14
USDT 1.00
SBD 2.51