What Will I Learn?
- You will learn how to reason about a Flutter Widget Tree
- You will learn how to make use of the Inherited Widget class in Flutter
- You will learn how to use a Gesture Detector in Flutter
- You will learn how to use the context of an application to get its state
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 look at inherited widgets, the widget tree and gesture detectors in Flutter. Inherited widgets are a idiomatic way of proliferating state, data and actions from one area of the application widget tree to another. They expose their information to the inheriting children widgets as public variables which can be access through the build context object. When an inherited widget's state changes, it calls for the consumer child widget to re-render in the tree which can help us save on performance when we have multiple widgets that share the same state.
Gesture detectors are widgets that detect gestures through the use of gesture recognizer functions. These recognizer functions are callback functions and the behavior of the gesture detector is based on which of these call backs are not null. The gesture detector listens for a stream of data which represent semantic actions such as taps, drags and panning. Based on the actions and the data that is presented to the gesture detector, the widget decides which function to use through various different rules.
All flutter objects are considered widgets. In this way, a flutter application is represented through a tree of widgets. Even the objects that have no form are considered widgets in the flutter application. Optimization of the widget tree can be helpful to make it easy to maintain a flutter application as well as increase the performance of this application.
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
Posted on Utopian.io - Rewarding Open Source Contributors