PluginUtils class
DigetSposPlugin.Utils — device and location utilities. Matches: DigetSposPlugin.Utils in native SDK.
Constructors
- PluginUtils.create()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canScheduleExactAlarms(
) → Future< bool> - Returns true if the app can schedule exact alarms.
-
currentLocation(
{required void completion(Map< String, dynamic> ? location, bool hasPermission)}) → Future<void> -
Gets current device location.
completionreceives (location Map?, hasPermission). -
deviceNeedsAutostart(
) → Future< bool> - Returns true if this device/OEM needs an autostart allowlist entry.
-
getData(
String key) → Future< String?> - Retrieves a value from encrypted DataStore.
-
getDeviceId(
{int? merchantId}) → Future< String?> - Returns unique device identifier.
-
haveLocationPermission(
) → Future< bool> - Returns true if location permission is granted.
-
haveNotificationPermission(
) → Future< bool> - Returns true if POST_NOTIFICATIONS permission is granted.
-
isBatteryUnrestricted(
) → Future< bool> - Returns true if the app is exempt from battery optimizations.
-
isLocationMocked(
Location location) → Future< bool> -
Checks if
locationis mocked/fake. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openAutostartSettings(
) → Future< void> - Opens the OEM autostart settings screen (no-op on stock Android).
-
openBatteryUnrestrictedSettings(
) → Future< void> - Opens the system battery-unrestricted settings screen.
-
openExactAlarmSettings(
) → Future< void> - Opens the system exact-alarm settings screen.
-
requestAutostartPermission(
{required void callback(bool granted)}) → Future< void> -
Requests autostart permission.
callbackreceives true if handled. -
requestBatteryUnrestricted(
{required void callback(bool granted)}) → Future< void> -
Requests battery-unrestricted exemption.
callbackreceives true if granted. -
requestExactAlarmPermission(
{required void callback(bool granted)}) → Future< void> -
Requests exact-alarm permission.
callbackreceives true if granted. -
requestLocationPermission(
{required void callback(bool granted)}) → Future< void> -
Requests location permission.
callbackreceives true if granted. -
requestNotificationPermission(
{required void callback(bool granted)}) → Future< void> -
Requests notification permission.
callbackreceives true if granted. -
saveData(
{required String key, required String value, required void onSuccess(bool granted), required OnErrorCallBack onError}) → Future< void> - Saves a value encrypted to DataStore.
-
securityThreats(
) → Future< List< String> > -
Runs the device-security scan and returns the detected threat identifiers
(e.g.
["ROOTED_DEVICE", "NFC_UNAVAILABLE"]). Never throws for missing permissions; toggled byDigetSposPlugin.updateSecurityChecks. -
showMessageDialog(
{required String title, required String message, void onClose()?}) → Future< void> - Shows an SDK-styled message dialog.
-
showSecurityStatus(
{List< String> ? detectedThreats}) → Future<void> -
Presents the device-security report screen listing every screened check as
Safe or Detected. Pass
detectedThreats(e.g. from securityThreats) to avoid re-scanning, or leave null to have the screen run the scan itself. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited