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
- 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 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
- Building a Movie Searcher with RxDart and SQLite in Dart's Flutter Framework (Part 1)
- Building a Movie Searcher with RxDart and SQLite in Dart's Flutter Framework (Part 2)
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