Flutter Interview Questions

Why

In past, there are a couple of times within a year I would start to learn Flutter or any other framework. I would open roadmap.sh to learn it from scratch. Up unitl now I realize this is just a wast of time, since I’m only familiar with the basic concepts because I don’t have the patientce to last long enough to reach the advanced toppics.

So this time, I decide to learn Flutter by preparing a real coding interview. This way, I push myself to jump right into where I’m not familiar with. Wish me good luck.

I use Flutter Interview Questions, note down my answer to the questions and expand from the question to concepts I need to refresh on and try to understand overall.

What

  1. What is Flutter?

A: Flutter is cross-platofrm UI framework.

  1. What is Dart and Why does Flutter use it?

A: Dart can be complied jsut in time, which is the foundation of Hot Realod, speeding up dev cycle. (And because Google invented Dart, this it.)

  1. What is pubspec.yaml file and what does it do?

A: pubspec.yaml specifies the project’s dependencies.

  1. What is the difference between main() and runApp() functions in Flutter?

A:

[Native OS Launches App]
          ↓
[Android: MainActivity / iOS: AppDelegate]
          ↓
[Flutter Engine Initialized]
          ↓
[Dart Runtime Starts]
          ↓
[main() Called]
          ↓
[runApp() Called → UI Built & Rendered]
  1. Differentiate between named parameters and positional parameters in Flutter.

A: named paramter is identified by key, which help with readability, while positional paramter idenfitied by relative position.

  1. What are widgets in Flutter?

A: A Widgets describe is part of UI (Element). Widgets have not mutable state, all its fields must be final. ????

Written on May 12, 2025