GeoEngine constructor

GeoEngine({
  1. required String apiKey,
  2. String? managementUrl,
  3. String? ingestUrl,
  4. Duration timeout = const Duration(seconds: 10),
  5. bool debug = false,
  6. String? androidCloudProjectNumber,
  7. Client? client,
})

Creates a new instance of GeoEngine.

  • apiKey: Required. The API key for your GeoEngine project.
  • managementUrl: Optional. Overrides the default management API URL.
  • ingestUrl: Optional. Overrides the default ingestion API URL.
  • timeout: Connection timeout for requests (default: 10 seconds).
  • debug: If true, prints debug info to the console (default: false).
  • androidCloudProjectNumber: Required for Android apps to use Play Integrity.
  • client: Optional http.Client for testing.

Implementation

GeoEngine({
  required this.apiKey,
  String? managementUrl,
  String? ingestUrl,
  this.timeout = const Duration(seconds: 10),
  this.debug = false,
  this.androidCloudProjectNumber,
  http.Client? client,
})  : managementUrl = managementUrl ?? _defaultManagementUrl,
      ingestUrl = ingestUrl ?? _defaultIngestUrl,
      _client = client ?? http.Client() {
  _initInternals();
}