Skip to content
tezvyn:

Flutter

294 bites tagged Flutter — interview questions with model answers, and 60-second explainers.

Flutter & Dart2 min read

Dart's Null-Aware Operators: Safely Handle Nulls

Null-aware operators let you work with potentially null values without a cascade of `if (x != null)` checks. Use them to access properties, provide defaults, or assign values only when a variable is null. The footgun is confusing safe `?.` with unsafe `!`.

Flutter & Dart2 min read

Dart's Sound Null Safety: No More Null Errors

In Dart, variables can't be null unless you explicitly allow it. This flips the usual model, turning potential runtime null pointer crashes into compile-time errors you can fix immediately.

Flutter & Dart2 min read

Dart Collections: Choosing List, Set, or Map

Dart collections organize data: use a List for ordered items, a Set for unique items, and a Map for key-value pairs. This choice is fundamental for storing UI widgets or parsing JSON. The common footgun is using a List for lookups, which is slow; use.

Flutter & Dart2 min read

Dart Function Syntax: Block Body vs. Arrow Notation

Dart functions use a block body `{}` for multiple statements or arrow syntax `=>` for a single expression. Use `=>` for simple one-liners like `bool isEven(int n) => n % 2 == 0;`. The footgun is using `=>` for multi-step logic; it only works for.

Flutter & Dart2 min read

Dart's Core Data Types: Everything is an Object

In Dart, everything is an object, from numbers to functions. This means even a simple `int` or `String` has methods and properties, unlike primitive types in other languages. The main footgun is forgetting that `null` itself is a type, `Null`.

Flutter & Dart2 min read

Dart Variables: var, final, and const

In Dart, `var` creates a mutable variable, while `final` and `const` are for single-assignment. Use `var` for changing state, `final` for runtime values set once, and `const` for compile-time constants. The footgun is confusing `final` with `const`.

Get Flutter bites daily.

Five a day, five minutes, offline. With quizzes so it sticks.

Open testing — you’ll join as an early tester.