Layouts & Constraints
Row, Column, Stack, Flex, Expanded, Flexible, constraints, BoxConstraints, LayoutBuilder
1Which widget should be used to arrange children horizontally in Flutter?
Which widget should be used to arrange children horizontally in Flutter?
Câu trả lời
Row is the fundamental widget for arranging children horizontally along the main axis. It respects its parent's constraints and distributes space according to mainAxisAlignment and crossAxisAlignment properties. For vertical layouts, Column is the equivalent.
2Which Row or Column property controls the distribution of children along the main axis?
Which Row or Column property controls the distribution of children along the main axis?
Câu trả lời
mainAxisAlignment controls how children are positioned along the main axis (horizontal for Row, vertical for Column). Options include start, center, end, spaceBetween, spaceAround, and spaceEvenly. crossAxisAlignment controls positioning on the perpendicular axis.
3What is the main difference between Expanded and Flexible?
What is the main difference between Expanded and Flexible?
Câu trả lời
Expanded forces its child to fill all available space (fit: FlexFit.tight), while Flexible allows the child to take the space it needs up to the maximum available (fit: FlexFit.loose by default). Expanded is actually a Flexible with fit: FlexFit.tight.
How does Stack position its children by default?
Which widget should be used to position a child at a specific location within a Stack?
+21 câu hỏi phỏng vấn
Các chủ đề phỏng vấn Flutter khác
Dart Basics
Dart Language Essentials
Flutter Fundamentals
Widget Lifecycle
Local Storage
Application Lifecycle
ListView & GridView
Navigation & Routing
Basic State Management
Provider Pattern
Networking & HTTP
JSON Serialization
Local Database
Forms & Validation
Animations
Firebase Integration
Unit Testing
Widget Testing
Build & Deployment
Package Management
Memory & Performance
Streams & RxDart
Advanced State Management
Flutter Design Patterns
Performance Optimization
Platform Channels
Custom Painting
Flutter Application Architecture
Nắm vững Flutter cho lần phỏng vấn tiếp theo
Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.
Bắt đầu miễn phí