
1. Flutter Basics
What is Flutter?
Flutter is Google’s open-source UI toolkit used for building cross-platform applications from a single codebase.
It allows developers to create apps for iOS, Android, web, and desktop with native-like performance.
Its biggest advantage is faster development and a consistent UI across platforms.
Flutter vs Native Development
Flutter uses one codebase for multiple platforms, while native development needs separate codebases.
For example, iOS uses Swift and Android uses Kotlin/Java.
Flutter saves time and cost, but native can sometimes give deeper platform-specific control.
StatelessWidget vs StatefulWidget
A StatelessWidget is immutable, meaning its data cannot change after creation.
A StatefulWidget can update dynamically during runtime using state changes.
For example, a text label is stateless, but a counter button is stateful.
What is the Widget Tree?
The Widget Tree is the structure of all widgets in an app, organized hierarchically.
Everything in Flutter is a widget, from buttons to padding.
Understanding the widget tree helps optimize UI and performance.
Hot Reload vs Hot Restart
Hot Reload updates code instantly without losing app state.
It is useful for quick UI changes during development.
Hot Restart rebuilds the whole app and resets everything.
2. State Management
What is State Management?
State management controls how data flows and updates inside an app.
It ensures UI changes when the data changes.
Without proper state management, apps become hard to maintain.
Provider vs GetX vs Riverpod vs Bloc
Provider is simple and beginner-friendly.
GetX is lightweight and easy to use with less boilerplate.
Riverpod is more flexible, and Bloc is best for large structured applications.
Best for large-scale apps?
For enterprise-level apps, Bloc and Riverpod are often preferred.
They provide better separation of concerns and scalability.
This makes the code easier to maintain in bigger teams.
What is Reactive Programming?
Reactive programming means the UI reacts automatically to data changes.
Instead of manually updating widgets, Flutter listens for state changes.
This creates smoother and cleaner app behavior.
3. Performance & Optimization
How do you optimize Flutter app performance?
Use const widgets, optimize images, reduce widget rebuilds, and lazy-load data.
Also, use efficient state management and avoid unnecessary logic inside build methods.
Profiling tools like Flutter DevTools help find performance bottlenecks.
What causes unnecessary widget rebuilds?
Improper use of setState() can rebuild too many widgets.
Poor widget tree design also increases rebuilds.
Breaking UI into smaller widgets helps reduce this.
Difference between const and normal widgets
Const widgets are compiled once and reused.
This reduces memory usage and improves rendering speed.
Normal widgets are recreated every time they rebuild.
How do you handle large lists efficiently?
Use ListView.builder for lazy loading.
It only builds visible items instead of all at once.
Pagination is useful for very large datasets from APIs.
4. API & Backend
How do you integrate REST APIs in Flutter?
Usually with packages like http or dio.
The app sends requests and receives JSON data from the backend.
Then we parse the JSON into models.
Future vs Stream
A Future returns one value once in the future.
A Stream can return multiple values over time.
For example, API calls use Future, chat apps use Stream.
How do you handle API errors and loading states?
Use try-catch for exceptions and display loading indicators.
Show proper error messages for better user experience.
Retry mechanisms improve reliability.
Experience with Firebase?
Firebase provides ready-to-use backend tools.
I’ve used it for authentication, Firestore, notifications, and storage.
It is especially useful for MVPs and real-time apps.
5. Advanced Flutter
What are Mixins in Dart?
Mixins allow sharing code between multiple classes.
They avoid deep inheritance structures.
For example, animation controllers often use mixins.
What are Isolates?
Isolates run heavy tasks in separate memory threads.
This prevents blocking the main UI thread.
Useful for JSON parsing or large computations.
What is Dependency Injection?
Dependency Injection means providing dependencies from outside a class.
This makes code more modular and testable.
Packages like GetIt are commonly used for this.
How does Flutter render UI internally?
Flutter uses its own rendering engine called Skia.
It draws every pixel directly instead of using native components.
This is why Flutter UI looks consistent across platforms.
What is Platform Channel?
Platform Channels let Flutter communicate with native code.
For example, accessing battery info or camera features.
It bridges Dart with Swift, Kotlin, or Java.
6. Real-world Questions
Describe a challenging bug you solved
A common example is fixing state synchronization issues after API calls.
I debugged logs, checked async flows, and improved state handling.
The solution made the app more stable and responsive.
How do you structure a production-level Flutter project?
I separate code into layers like UI, business logic, and data.
Folders usually include screens, widgets, models, services, and repositories.
This improves readability and teamwork.
Have you implemented push notifications, payments, or real-time features?
Yes, using Firebase Cloud Messaging for notifications.
Stripe for payments and Firebase/WebSockets for real-time updates.
These are common requirements in modern apps.
How do you manage app scalability?
By following clean architecture and modular design.
Using proper state management and reusable components is important.
Also, backend scalability and testing are critical for growth. Questions
