
Flutter key points mostly asked in flutter interviews
Here’s a comprehensive list of key points that are frequently asked in Flutter interviews, covering both basic and advanced topics. These points are categorized for better clarity:
1. Flutter Basics
- What is Flutter?
- Open-source UI toolkit by Google for building natively compiled applications for mobile, web, and desktop from a single codebase.
- What is Dart?
- Language used by Flutter, optimized for fast apps on multiple platforms.
- Main components of Flutter
- Widgets, Elements, Render Objects
- Difference between Hot Reload & Hot Restart
- Hot reload: Injects updated code into the running app.
- Hot restart: Rebuilds the app from scratch.
- StatelessWidget vs StatefulWidget
- Stateless: immutable, no internal state.
- Stateful: maintains mutable state.
- Widget lifecycle
createState
,initState
,build
,didUpdateWidget
,dispose
2. UI & Widgets
- Common Widgets
Container
,Row
,Column
,Stack
,ListView
,Text
,Image
, etc.
- Layout and Constraints
- Flutter uses constraints to define UI layout.
- Parent sets constraints, child chooses size.
- ListView vs Column
ListView
is scrollable;Column
is not.
- Custom Widgets
- Creating reusable widget components.
- InheritedWidget / Provider
- State sharing higher up in the widget tree.
3. State Management
- Why state management is important?
- Helps manage and update UI based on user interaction or data changes.
- Popular approaches
setState
,Provider
,Riverpod
,Bloc
,GetX
,MobX
,Redux
- When to use setState vs Provider/Bloc?
setState
: for local widget state.Provider/Bloc
: for app-wide or complex state.
4. Navigation & Routing
- Navigator 1.0 vs Navigator 2.0
- Navigator 1.0: Stack-based imperative API.
- Navigator 2.0: Declarative API (useful for web).
- Named routes vs anonymous routes
- Passing data between screens
5. Networking
- HTTP requests with
http
package - Dio package for advanced networking
- Handling JSON (parsing, serialization)
- Using
FutureBuilder
for async data
6. Local Storage
- SharedPreferences
- For small key-value data.
- Hive
- Lightweight NoSQL DB.
- Sqflite
- SQLite DB for structured data.
7. Integrations & Plugins
- Popular Plugins
url_launcher
,path_provider
,camera
,image_picker
,firebase
, etc.
- Platform-specific code
- MethodChannels for native Android/iOS code.
8. Firebase Integration
- Firebase Authentication
- Cloud Firestore / Realtime Database
- Firebase Cloud Messaging (Push Notifications)
- Firebase Storage
9. Testing
- Flutter test packages
flutter_test
,mockito
,integration_test
- Types of testing
- Unit testing
- Widget testing
- Integration testing
10. Advanced Concepts
- Isolates in Dart
- For running expensive tasks in parallel.
- Streams & Futures
- Handling asynchronous data and real-time updates.
- Flutter DevTools
- Performance profiling, widget inspector, etc.
- Animations in Flutter
AnimatedContainer
,TweenAnimationBuilder
,AnimationController
- Custom Paint & Canvas
- Drawing graphics and shapes manually.
11. Performance Optimization
- Widget rebuilding
- Using
const
constructors - Avoiding unnecessary rebuilds
- Using
RepaintBoundary
12. Deployment
- Building APK / AAB for Android
- iOS setup and deployment
- Code signing and provisioning profiles
13. Interview Questions Examples
Basic
- What is a Widget in Flutter?
- Explain the build context.
- Difference between hot reload and hot restart.
Intermediate
- How does Flutter render UI?
- When would you use a
FutureBuilder
? - How do you manage state in a large Flutter app?
Advanced
- How does the Flutter rendering pipeline work?
- Compare Bloc vs Provider.
- How to write a custom
InheritedWidget
?
Pingback: How to use ListView.builder in flutter - Dheeraj Hitech
Pingback: How to use row and column in flutter - Dheeraj Hitech
Pingback: How to use WebSocket in flutter step by step guide - Dheeraj Hitech