mapClientProvider top-level property

FutureProvider<FleetMapClient> mapClientProvider
final

Provides a map client that obtains weather data from the Open Weather service.

Configured using environment variables.

Implementation

final mapClientProvider = FutureProvider<FleetMapClient>(
  (ref) async => OpenWeatherMapClient(
    userAgent: await ref.watch(userAgentProvider.future),
    mapUrlTemplate: await ref.watch(_openStreetMapUrlTemplateProvider.future),
    darkMapUrlTemplate:
        await ref.watch(_openStreetMapDarkUrlTemplateProvider.future),
    weatherMapUrlHost: await ref.watch(_openWeatherMapUrlHostProvider.future),
    weatherMapUrlPath: await ref.watch(_openWeatherMapUrlPathProvider.future),
    appId: await ref.watch(_openWeatherAppIdProvider.future),
    analytics: ref.watch(analyticsProvider),
  ),
);