Skip to content

modsen-flutter: drop freezed, add Retrofit over Dio (1.0.0 → 2.0.0)

Yegor Cheprasov requested to merge refactor/flutter-drop-freezed-add-retrofit into main

Models lose their generator: unions and data classes are native Dart 3 sealed/final classes with equatable, so json_serializable is the only model-side codegen left. The new failure mode — a field missing from props means Bloc skips the emit and the screen never rebuilds — is called out in rules/dart.md, rules/bloc.md and the testing skill.

Networking splits in two: Dio stays the transport (interceptors, refresh, timeouts, cancellation), Retrofit declares the endpoints as @RestApi abstract classes in data/api/. baseUrl stays on the Dio instance, the Authorization header stays in the interceptor, the no-auth flag moves to @Extra, and CancelToken travels via @CancelRequest.

Major because both rules reverse what the previous version mandated.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

Merge request reports