Câu hỏi phỏng vấn Flutter
Câu hỏi

What is the difference between Scaffold and Container in Flutter?

Câu trả lời

The main differences between Scaffold and Container in Flutter are:

  1. Purpose: Scaffold is a top-level widget that provides a consistent structure for a Material Design app, including an AppBar, BottomNavigationBar, Drawer, and FloatingActionButton. In contrast, Container is a general-purpose widget used to hold and style other widgets[1][2].

  2. Child: Scaffold can have only one child, which is typically a Container or Column. Container can also have only one child widget[1][4].

  3. Styling: Container provides rich styling options like padding, margin, decoration, and alignment. Scaffold has fewer styling options and is more focused on providing the overall app structure[1][5].

  4. Flexibility: Container can have a flexible width and height based on its child's size. Scaffold always takes up the full available width and height of the screen[...

middle

middle

Gợi ý câu hỏi phỏng vấn

senior

What are the similarities and differences of Future and Stream?

senior

What does a class with a method named ._() mean in Dart/Flutter?

junior

What is the difference between Expanded and Flexible widgets?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào