setLicenseKey static method

void setLicenseKey(
  1. String licenseKey, {
  2. bool autoRefresh = true,
})

Set the Genius Scan SDK license key with optional auto-refresh.

This method doesn't return an error but will log warnings should the key be invalid or expired. All other SDK methods that return errors will report an error if there is a problem with the license key, and you must handle them to ensure you provide a good "degraded" experience. For instance, you can prompt the user to update the application to use the scanning feature in case they use a version of the application with an expired license key.

Implementation

static void setLicenseKey(String licenseKey, {bool autoRefresh = true}) {
  _channel.invokeMethod('setLicenseKey', <String, dynamic>{
      'licenseKey': licenseKey,
      'autoRefresh': autoRefresh,
    });
}