计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
flutter-retrofit-networking【效率与协作】Build type-safe HTTP networking with Dio and Retrofit including auth interceptors in Flutter. Use when integrating REST APIs with Dio or Retrofit.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
infrastructure/
├── data_sources/
│ ├── remote/ # Retrofit abstract classes
│ └── local/ # Cache/Storage
└── network/
├── dio_client.dart # Custom Dio setup
└── interceptors/ # Auth, Logging, Cache
@RestApi() and HTTP annotations (@GET, @POST). Methods return Future<DTO>.@freezed and @JsonSerializable for all request/response bodies.userDto.toDomain()).@JsonKey(unknownEnumValue: Status.unknown) to prevent crashes from new backend values.Authorization: Bearer <token> in onRequest.refreshToken(), update stored token, retry via dio.fetch(err.requestOptions).DioException to typed Failure objects (ServerFailure, NetworkFailure).See implementation examples for RestClient definitions and safe enum DTO patterns.
jsonDecodeDio through DIunknownEnumValue to prevent crashes on new backend valuesFor RestClient definitions and Auth Interceptor implementation: See references/REFERENCE.md.
feature-based-clean-architecture | error-handling