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

in #utopian-io6 years ago (edited)

What Will I Learn?

  • You will learn how to make use of the Tab and Tab Controller Widgets
  • You will learn how to properly read and write from a database from multiple widgets
  • You will learn how to structure and refactor a flutter project
  • You will learn how tab widgets work in the widget tree
  • You will learn how to restructure an application based on exceptions and errors

Requirements

Difficulty

  • Intermediate

Description

In this final part of this Flutter video tutorial series, we finish our application by adding a Tab Controller and some Tabs as well as a favorites page. We also refactor the old code in a way that makes it much more efficient for our new layout. Through this application, we also explore how we can reduce exceptions including exceptions related to reading and writing from our SQLite database from multiple places in our application.

The Tab widget in Flutter allows us to create a simple routing solution with built-in animations and routes. This is a fairly elegant solution for an application that contains only a few static pages like in this movie searcher application. Because we only have two main pages in our application, we can define that we only need two tabs and then associate our custom widgets with these tabs. This also allows us to justify refactoring all of our main stateful widgets into a single folder.

We refactor our Database so that it is only being instantiated in our main Database class. In this way, we create a singleton object that can provide the data to all of the branches of our application. The we also add read capabilities to our database so that we can fetch the movies out of it and present them onto our favorites tab. This capability also allows us to maintain the favored state of each of the movie extension tiles on our homepage.

The source code for this project can be found here

Video Tutorial

Tutorial Videos

Curriculum



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

Excellent work @tensor. I look forward to more of your excellent tutorials.

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

Thank you for the compliment and for moderating my contribution.

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.30
TRX 0.12
JST 0.034
BTC 63900.40
ETH 3140.82
USDT 1.00
SBD 3.98