Skip to main content

WP-00 Flutter spec

Live pieces stay. New paths copy EndpointUri into ApiConfig. Wire: exchange/common.md.

Usage​

The home health check calls HealthRemoteDataSource through AfiaApiClient.get(ApiConfig.health). Force-update will call ApiConfig.appVersion the same way. Feature packages do not construct URLs by hand.

Domain​

  • HealthStatus at lib/domain/entities/health_status.dart (live).

No new domain type for version until a feature asks for a force-update banner.

Models​

  • HealthStatusModel at lib/data/models/health_status_model.dart. fromJson keys status, service. Match the live health JSON.

Data sources​

  • HealthRemoteDataSource at lib/data/datasources/health_remote_data_source.dart. Uses AfiaApiClient.
  • AfiaApiClient at lib/core/network/afia_api_client.dart. Single HTTP client.

ApiConfig at lib/core/const/api_config.dart copies every reserved path WP-00 adds to EndpointUri.

Repositories​

Presentation today talks to the health data source. Keep that until a feature asks for a health repository. Do not add a second client.

Does not do​

Java types. Invented screens. A second HTTP client. Feature folders under presentation/.