4
Introduction to Widgets
It’s time to finally start playing with Flutter!
In Flutter, everything you see is a widget. Everything your users see and interact with, such as text, a button, an image, a table, or a scrolling list, is a widget. Even the app itself is, in fact, a widget.
Most widgets in Flutter are supposed to perform a single small task. On their own, widgets are classes that perform tasks on the user interface. A Text
widget displays text. A Padding
widget adds space between widgets. A Scaffold
widget provides a structure for a screen.
The real power of widgets comes not from any individual class, but from how you can compose them together to create expressive interfaces. All the widgets on a screen, when combined together, form ...
Get Flutter Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.