Flutter & Dart
24 questions · 5 output questions · 8 challenges · 3 mocks
View the repository on GitHubDart Fundamentals
Collections: List, Set, and Map
What's the difference between `List`, `Set`, and `Map` in Dart, and when should you use each?
Data types in Dart
What are Dart's basic data types, and what's the difference between `dynamic`, `Object`, and `var`?
Null Safety
What is null safety in Dart, and what are `?`, `!`, `??`, and `late` for?
Dart's special operators
What do the cascade operator (`..`), the spread (`...`), and the collection operators (`if`/`for` inside lists) do in Dart?
var, final, and const
What's the difference between `var`, `final`, and `const` in Dart?
Advanced Dart
Classes and constructors
What kinds of constructors exist in Dart (default, named, `factory`) and what is each one for?
Future, async and await
What is a `Future` in Dart and how do `async` and `await` work?
Closures
What is a closure in Dart and what is it used for?
Functions and parameters
What kinds of parameters exist in Dart (positional, optional, named) and how do you declare them?
Streams
What is a `Stream` and how does it differ from a `Future`?
extends, implements and mixins (with)
What is the difference between `extends`, `implements` and `with` (mixins) in Dart?
Flutter Fundamentals
BuildContext
What is `BuildContext` in Flutter, and what is it used for?
Keys
What are `Key`s used for in Flutter, and when do you need them?
Lifecycle of a StatefulWidget
What are the lifecycle methods of a `State`, and what is each one for?
StatelessWidget vs StatefulWidget
What's the difference between a `StatelessWidget` and a `StatefulWidget`, and when should you use each one?
What is a widget?
What is a widget in Flutter, and what does it mean that "everything is a widget"?
Flutter State
const constructors and performance
Why is it good practice to use `const` constructors in Flutter widgets?
InheritedWidget
What is an `InheritedWidget` and why is it important for state management?
setState
What does `setState` do, and what exactly happens when you call it?
State management (Provider, Riverpod, Bloc)
What state management options do you know in Flutter, and when would you use each one?
Advanced Flutter
ListView and ListView.builder
What's the difference between `ListView(children: [...])` and `ListView.builder`, and why does it matter?
FutureBuilder and StreamBuilder
What are `FutureBuilder` and `StreamBuilder` for, and when do you use each one?
Navigation between screens
How does navigation work in Flutter, and what's the difference between `push` and `pushReplacement`?
Rebuilds and performance
What causes a widget to rebuild, and how do you avoid unnecessary rebuilds?
Coding challenges
generate the Fibonacci sequence.
dart
count the frequency of each character in a text.
dart
FizzBuzz (the interview classic).
dart
flatten a nested list (turn lists within lists into a single one).
dart
find the largest number in a list.
dart
detect whether a text is a palindrome.
dart
reverse a string (turn the text around).
dart
remove duplicate elements from a list.
dart
What does this code print?
What does it print? #001
integer division, int vs double, num, the is operator.
What does it print? #002
const and canonicalization, list equality, identical.
What does it print? #003
null safety, string interpolation, ?. and ??.
What does it print? #004
Dart's event loop, microtask queue vs event queue.
What does it print? #005
closures in a for loop, references vs copies of lists.