To get started is most of the time the most daunting task so let’s do it together, this is what we will build!
I also have a competition for this one with a total of $175 in Amazon gift cards so make sure to check the video to learn more about that!
You can follow me on twitter: @robertbrunhage This article was originally posted at robertbrunhage.com
The basics
First of we have to first understand two basic concepts which are StatelessWidget
and StatefulWidget
and I think the most simple way to explain it is to think of a StatelessWidget
will just display data and StatefulWidget
will display data but with it, it's also possible to update and display new data. In the case of Flutter, we have something called a Widget Tree
where these will be used.
And example could be that you have a parent widget which is Stateful
and a child widget which is Stateless
. In the case where you tell the Stateful
one to rebuild the child/children will also rebuild. So always start with a StatelessWidget
and convert it to Stateful
when you find the need for it.