campusMapRepositoryProvider top-level property

Provider<CampusMapRepository> campusMapRepositoryProvider
final

Provides the app-scoped public map cache, isolated from local demo data.

Implementation

final campusMapRepositoryProvider = Provider<CampusMapRepository>((ref) {
  final isDemo = ref.watch(isDemoProvider);
  final database = isDemo
      ? AppDatabase(NativeDatabase.memory())
      : ref.watch(databaseProvider);
  if (isDemo) ref.onDispose(database.close);
  return CampusMapRepository(
    service: ref.watch(campusMapServiceProvider),
    database: database,
    firstFloorOutlines: isDemo ? null : campusMapFirstFloorOutlines,
  );
});