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
- IDEA intellij or Visual Studio Code with the Dart/Flutter Plugins
- The Dart SDK and the Flutter SDK
- A fair understanding of Mobile development and Imperative or Object Oriented Programming
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
- Dart Flutter Cross Platform Chat Application Tutorial
- Building a Multi-Page Application with Dart's Flutter Mobile Framework
- Making Http requests and Using Json in Dart's Flutter Framework
- Building Dynamic Lists with Streams in Dart's Flutter Framework
- Using GridView, Tabs, and Steppers in Dart's Flutter Framework
- Using Global Keys to get State and Validate Input in Dart's Flutter Framework
- The Basics of Animation with Dart's Flutter Framework
- Advanced Physics Based Animations in Dart's Flutter Framework
- Building a Drag and Drop Application with Dart's Flutter Framework
- Building a Hero Animation and an Application Drawer in Dart's Flutter Framework
- Building a Temperature Conversion Application using Dart's Flutter Framework
- Using Inherited Widgets and Gesture Detectors in Dart's Flutter Framework
- Using Gradients, Fractional Offsets, Page Views and Other Widgets in Dart's Flutter Framework
- Building a Calculator Layout using Dart's Flutter Framework
- Finishing our Calculator Application with Dart's Flutter Framework
- Making use of Shared Preferences, Flex Widgets and Dismissibles with Dart's Flutter framework
- Using the Different Style Widgets and Properties in Dart's Flutter Framework
- Composing Animations and Chaining Animations in Dart's Flutter Framework
- Building a Countdown Timer with a Custom Painter and Animations in Dart's Flutter Framework
- Reading and Writing Data and Files with Path Provider using Dart's Flutter Framework
- Exploring Webviews and the Url Launcher Plugin in Dart's Flutter Framework
Posted on Utopian.io - Rewarding Open Source Contributors