Basic and advanced networking in Dart and Flutter
summary
Migrates domain models to generated JSON-aware classes so API models and mappers disappear, uses JSON serializable (via dart run build_runner) with custom converters for dates and enums, parses union/variant types by injecting runtime type hints, adds an interceptor that reads a request marker to attach auth headers, and replaces repetitive HTTP code with dio + retrofit generation. The demo app uses a mocked backend, the rebuilt client runs and renders events, and the approach removes a large amount of manual code while scaling to many endpoints.
AI-written summary · about
chapters (12)
- 0:00Welcome
- 2:50Project challenges
- 11:02Free models and unions
- 14:12Repository and API structure
- 17:28Eliminating JSON parsing
- 24:30Code generation best practices
- 37:47Complex JSON inheritance
- 44:21Optimizing API interceptors
- 54:21Refactoring with Retrofit
- 1:08:30Managing dependencies
- 1:12:46Final summary
- 1:16:20Error handling








