~/talk

Pattern Matching to the rescue!

Talkat Fluttercon USA 2024 · 2024-09-19..09-20· [android]
links:none on file
slides:none on file

Pattern matching in Dart becomes concrete: switch as expression returns values, wildcard _ supplies fallbacks, and class patterns extract fields from a Point (x,y) to match x == 0 or x in {3,5,9}. Enums require exhaustive cases or a wildcard. Lists support head/tail and fixed-length patterns; maps match keys and distinguish null value vs missing key (example: JWT present vs absent). The when checks external vars feature combines an extracted field with an outside condition.

AI-written summary · about

  1. 0:00Pattern matching intro
  2. 2:42Switch limits and Dart syntax
  3. 5:18Switching on classes
  4. 8:09Handling enums exhaustively
  5. 9:13Extracting with when
  6. 11:45Pattern matching lists/maps
  7. 14:57Null checks and map extraction
  8. 17:33Efficient pattern matching tips
  9. 19:46Closing & Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.