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

junior

Does Flutter work like a browser? How is it different from a WebView based application?

middle

How do you check if an async void method is completed in Dart?

middle

Differentiate between named parameters and positional parameters in Dart?

Bình luận

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

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