CampusMapRepository class
Caches building outlines, indoor floors, and a metadata-only search index.
A geometry request fetches exactly one building-floor layer. Search loads names and numbers across published layers only when first used, preserving previously downloaded polygons. All dataset changes commit atomically.
Constructors
-
CampusMapRepository({required CampusMapService service, required AppDatabase database, DateTime now()?, Map<
String, ({String geometry, String name})> ? firstFloorOutlines = campusMapFirstFloorOutlines}) -
Creates a repository with framework-independent
serviceanddatabase.
Properties
-
campuses
→ List<
CampusMapCampus> -
Bundled campus geometry is available offline and does not require a DB cache.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
locateRoom(
CampusMapRoom result) → Future< CampusMapRoom?> - Fetches the owning floor if needed and resolves a search result's geometry.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refreshBuildings(
) → Future< void> - Fetches building and layer catalogs atomically without deleting room cache.
-
refreshFloor(
String layerName) → Future< void> -
Fetches and replaces geometry for only
layerNamein one transaction. -
searchRooms(
String query, {Map< String, String> buildingNames = const {}}) → Future<List< CampusMapRoom> > - Searches room names, numbers, and building-qualified classroom references.
-
toString(
) → String -
A string representation of this object.
inherited
-
watchBuildings(
) → Stream< List< CampusMapBuilding> > - Watches building outlines with their own available floors from Drift.
-
watchFloor(
String layerName) → Stream< CampusMapFloorData> -
Watches cached geometry for one published
layerName.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited