Flutter is one of the fastest-growing frameworks for cross-platform app development. If you are preparing for an interview like with Chetu Company, here's a complete list of commonly asked Flutter Interview Questions & Answers to help you revise quickly.

Flutter interview questions and answers

1. What is State Management in Flutter?

State management is how you manage and update the data that affects your UI. It ensures the UI automatically reflects changes in the application state.

2. Why Not Always Use setState?

setState rebuilds the entire widget tree every time it is called. For small, local UI changes it works fine, but for larger apps it becomes inefficient, hard to maintain, and difficult to share state across multiple widgets. That is why dedicated state management solutions like Provider, Riverpod, Bloc, or GetX are preferred.

3. Package vs Plugin in Flutter

A package is pure Dart code that adds functionality without needing platform-specific code. A plugin is a package that includes platform-specific code for Android or iOS, such as accessing the camera or GPS.

4. What are Keys in Flutter?

Keys are used to preserve widget state when widgets are rebuilt, especially in lists. They help Flutter differentiate between widgets with the same type.

5. Stream in Flutter

A Stream is an asynchronous sequence of data events. It allows listening to continuous data over time, like real-time database updates or user input. Streams can be single-subscription or broadcast depending on the use case.

6. Stateful vs Stateless Widget

A StatelessWidget is immutable โ€” it does not change after it is built. A StatefulWidget holds mutable state that can change during the widget's lifetime, triggering a UI rebuild when setState is called.

7. Stateful Widget Lifecycle

The key lifecycle methods of a StatefulWidget are:

  • createState() โ€” creates the mutable state object
  • initState() โ€” called once when the widget is inserted into the tree
  • didChangeDependencies() โ€” called when dependencies change
  • build() โ€” called every time the widget needs to be rendered
  • setState() โ€” triggers a rebuild of the widget
  • didUpdateWidget() โ€” called when the parent widget changes
  • dispose() โ€” called when the widget is permanently removed

8. What is a Mixin in Flutter?

A way to reuse a class's code in multiple class hierarchies. It allows adding functionality without inheritance.

9. What is Extension in Flutter?

Extensions add new methods and properties to existing classes without modifying their source code.

10. What is ChangeNotifier?

A simple class for state management that notifies listeners when notifyListeners() is called.

11. What is Dependency Injection?

A design pattern where objects are provided their dependencies instead of creating them internally, improving reusability and testability.

12. ListView vs ListView.builder

ListView renders all items at once and is suitable for small, fixed lists. ListView.builder renders items lazily โ€” only the visible items are built โ€” making it far more performant for long or dynamic lists.

13. What is Tree Shaking?

A Dart and Flutter compiler optimization that removes unused code from the final build, reducing app size.

14. Method Channel in Flutter

A Method Channel is a communication bridge between Flutter (Dart) and the native platform (Android/iOS). It allows Flutter to call native code and receive results back, used when Flutter plugins do not cover a specific native feature.

15. Firebase Notifications in Flutter

Firebase Cloud Messaging (FCM) allows sending push notifications to Android and iOS apps using Firebase.

16. How to Use Firebase Notifications?

  1. Add firebase_messaging package to pubspec.yaml
  2. Initialize Firebase in main.dart using Firebase.initializeApp()
  3. Request notification permission from the user
  4. Use FirebaseMessaging.onMessage to handle foreground notifications
  5. Use FirebaseMessaging.onMessageOpenedApp to handle background tap events
  6. Use FirebaseMessaging.instance.getToken() to get the device token for targeted notifications

17. Async & Await in Flutter

async marks a function as asynchronous. await pauses execution inside an async function until a Future completes, allowing you to write asynchronous code in a clean, readable way without nested callbacks.

18. MaterialApp vs Scaffold

MaterialApp is the root widget that sets up the app theme, routes, and localization. Scaffold provides the basic visual structure for a single screen โ€” app bar, body, floating action button, bottom navigation, and drawer.

19. About Flutter

Flutter is an open-source framework by Google for building cross-platform apps (Android, iOS, Web, Desktop) using a single codebase. It uses the Dart language and provides fast performance with a widget-based architecture.

20. How to Remove Debug Banner in Flutter?


dart

MaterialApp(
  debugShowCheckedModeBanner: false,
);

Final Note: These questions are commonly asked in Flutter interviews at Chetu and other companies. Revising them will boost your confidence and help you give crisp, clear answers.