~/talk

Getting to know js_interop

Talkat Fluttercon USA 2025 · 2025-06-25..06-26· [flutter, web-platform]
name:Kali
links:none on file
slides:none on file

Explains concrete JS <-> Dart conversions: use the web package and jsify and dartify for coarse map/object work but prefer targeted conversions because arrays and promises need two-step conversions (collection first, contents second) and promises convert to futures but still contain JS types. Shows using JS interop unsafe for property access, setProperty and bracket notation, external/@JS for Chrome APIs, and exporting Dart classes to JS. Demo adds gamepad to a T‑Rex game and a Chrome extension — both work.

AI-written summary · about

  1. 0:00Welcome
  2. 1:03JS interop overview
  3. 2:29Dart and JS types
  4. 4:55Technical difficulties
  5. 5:36JS interop types
  6. 6:41JS to Dart conversions
  7. 9:11Type checking JS values
  8. 9:31Parameterized types
  9. 11:38JS objects and maps
  10. 13:04Unsafe JS interop
  11. 14:09Dart from JS objects
  12. 15:56Safe type casting
  13. 17:43JS objects lessons
  14. 18:04JS functions
  15. 19:08Calling JS from Dart
  16. 20:12External libraries
  17. 21:14Exporting Dart classes
  18. 22:16Practical exports
  19. 23:22Null vs undefined
  20. 24:49Void and edge cases
  21. 25:11JS interop tips
  22. 26:15Final thoughts
~/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.