Dart Practice (Fundamentals)
Intuition
Learning through practice: Practice problems are like training drills — they help you apply knowledge and identify areas that need more study.
Why it matters: Regular practice builds confidence and reveals patterns in how concepts are tested. Each problem reinforces key programming concepts.
The key insight: Making mistakes during practice is valuable — each error points to a concept that needs clarification.
Dart — Interactive Practice
10 auto-graded practice problems covering core Dart concepts. Select an answer, submit, and review the explanation.
Null Safety and Types
Async and Streams
Dart 3 Features
OOP and Extensions
Flutter and Advanced
Cross-References
- Dart Flashcards: Interactive flashcards covering the same core Dart concepts tested here.
- Variables: Type specifiers and null safety fundamentals behind these practice problems.
- Async and Futures: Async patterns and event loop mechanics tested in the async section.
- Error Handling: Exception handling patterns referenced in the practice explanations.
Common Mistakes
Forgetting that async functions return Future immediately: Calling fetchName() without await gives you a Future<String>, not the string. Always await to get the actual value.
Using ! (null assertion) excessively: ! throws a runtime exception if the value is null. Prefer safe navigation ?., ??, or proper null checks to handle nullable values gracefully.
Confusing mixins with inheritance: Mixins are composed into a class via with, not extends. Using with when you need extends (or vice versa) causes “class not found” errors.