MapViewConfiguration constructor

MapViewConfiguration({
  1. String? situmUser,
  2. required String situmApiKey,
  3. String? buildingIdentifier,
  4. String? remoteIdentifier,
  5. String? viewerDomain,
  6. String apiDomain = "dashboard.situm.com",
  7. TextDirection directionality = TextDirection.ltr,
  8. bool enableDebugging = false,
  9. bool? lockCameraToBuilding,
  10. bool? persistUnderlyingWidget = false,
  11. String? language,
})

The MapView settings. Required fields are your Situm user and API key, but also a buildingIdentifier or remoteIdentifier.

Implementation

MapViewConfiguration({
  this.situmUser,
  required this.situmApiKey,
  this.buildingIdentifier,
  this.remoteIdentifier,
  String? viewerDomain,
  this.apiDomain = "dashboard.situm.com",
  this.directionality = TextDirection.ltr,
  this.enableDebugging = false,
  this.lockCameraToBuilding,
  this.persistUnderlyingWidget = false,
  this.language,
}) {
  if (viewerDomain != null) {
    if (!viewerDomain.startsWith("https://") &&
        !viewerDomain.startsWith("http://")) {
      viewerDomain = "https://$viewerDomain";
    }
    if (viewerDomain.endsWith("/")) {
      viewerDomain = viewerDomain.substring(0, viewerDomain.length - 1);
    }
    this.viewerDomain = viewerDomain;
  } else {
    this.viewerDomain = "https://map-viewer.situm.com";
  }
}