Flutter Common interview Questions -1
Flutter Common interview Questions -1
1
2.3 What’s BuildContext?
BuildContext is an object that locates a widget in the widget tree. It helps access
inherited widgets, like ThemeData, or manage navigation.
3. State Management
3.1 What’s state management, and why is it important?
State management handles state (data) changes to update the UI. It’s key for making
apps responsive to user interactions or data updates.
4. UI and Layout
4.1 What’s the difference between Row and Column?
A Row arranges widgets horizontally (side by side). A Column arranges them vertically
(stacked). Both use MainAxisAlignment for positioning.
2
4.2 How do you make an app responsive?
I use MediaQuery for screen size, LayoutBuilder for widget constraints, and Flexi-
ble/Expanded widgets to adapt the layout to different devices.
6. Navigation
6.1 How do you switch screens?
I use Navigator.push to add a new route (screen) and Navigator.pop to go back, like
flipping pages in a stack.
3
6.3 What’s Named Navigation?
Named Navigation uses route names defined in MaterialApp’s routes map. I call
Navigator.pushNamed to jump to a screen by name.
8. Testing
8.1 What tests are supported in Flutter?
Unit tests for functions, widget tests for UI components, and integration tests for
app flows.
9. Advanced Topics
9.1 What’s Dart in Flutter?
Dart is Flutter’s programming language. It supports JIT compilation for hot reload
and AOT compilation for fast apps.
4
9.2 What’s Hot Reload?
Hot Reload updates the UI instantly when code changes, speeding up development
without restarting the app.