Flutter · One codebase, native feel
Which Dart language features matter most in Flutter work?
Short answer
Dart's sound null safety, final-by-default style, async support, records and pattern matching shape most Flutter code. Understanding them prevents null errors and makes state handling explicit.
Dart is statically typed and null-safe. A nullable type must be handled before use, and the compiler enforces that at compile time. Flutter code also leans on final fields, const constructors and collection literals, because immutability makes widget rebuilds cheaper and reasoning easier.
String greet(String? name) {
final display = name ?? 'guest';
return 'Hello, ' + display;
}
void main() {
final record = (name: 'Asha', age: 28);
print(greet(record.name));
final scores = <int>[42, 87, 65];
final passed = scores.where((score) => score >= 70).toList();
print(passed.length);
}Features that appear constantly
- Null safety with ?, ??, ??= and the null-aware spread operator
- late for fields initialised after construction, such as controllers in initState
- Records and destructuring for returning multiple values without a class
- Pattern matching and sealed classes for exhaustive state handling
- Extension methods for adding behaviour without inheritance
Dart is single-threaded per isolate but supports asynchronous concurrency through Future and Stream. That model is why blocking work must move to an isolate rather than spawning a thread and sharing memory.
Follow-ups you should expect
Interviewers use these to check whether the first answer was understanding or memorisation.
- 1What does sound null safety guarantee at runtime?
- 2When would you use late instead of a nullable field?
- 3How do records improve API design compared with small classes?
- 4What is an extension method and when does it become hard to maintain?
Say it in the interview
Dart's null safety is the feature I rely on most. Nullable values have to be handled explicitly, so a lot of null bugs are caught at compile time. I also use records for small grouped return values, pattern matching for exhaustive state, and const constructors for widget performance. Dart runs one isolate per thread with no shared mutable memory, so heavy work has to move to another isolate.
Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.
Related questions
Reading is step one
Now say it out loud.
Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Flutter mock interview and get scored feedback on depth, clarity and confidence.