Flutter 4.1 - Những widget quan trọng
MaterialApp / CupertinoApp Typically the root widget in your app Does a lot of “behind-the-scenes” setup work for your app Allows you to configure a global theme for your app Sets up navigation behavior (e.g. animations) for your app Scaffold / CupertinoPageScaffold Typically used as a frame for a page in your app Provides a background, app bar, navigation tabs, etc Only use one scaffold per page! Container Extremely versatile widget! Can be sized (width, height, maxWidth, maxHeight), styled (border, color, shape, …) and more Can take a child (but doesn’t have to) which you also can align in different ways You’ll use this widget quite often Row / Column Must-use if you need multiple widgets sit next to each other horizontally or vertically Limited styling options => Wrap with a Container (or wrap child widgets) to apply styling Children can be aligned along main-axis and cross-axis (see separate cheat sheet Flexible / Expanded Also see separate cheat sheet attached to lecture about ...