getKioskMode function

Future<KioskMode> getKioskMode()

Returns the current KioskMode.

On Android, it calls isInLockTaskMode.

On iOS, it returns result of UIAccessibility.isGuidedAccessEnabled.

Implementation

Future<KioskMode> getKioskMode() =>
    _channel.invokeMethod<bool>('isInKioskMode').then(
          (isInKioskMode) =>
              isInKioskMode == true ? KioskMode.enabled : KioskMode.disabled,
        );