Toggle Your Flutter
Switching between Material and Cupertino.
Let’s demonstrate how Flutter allows you to ‘rebuild’ only certain branches of its widget tree when you wish. StatefulWidgets built upon other StatefulWidgets is a very common way to selectively choose ‘how much’ of your Flutter app’s interface is essentially rebuilt from scratch.
As in many of my articles, I’ll work with a well-known Flutter example to demonstrate the topic. Today, we’ll go to the old Write your first Flutter app example — with some modification of course. Unlike the original, there are two State objects in…