MethodChannelUssdHandler class

An implementation of UssdHandlerPlatform that uses method channels.

Inheritance

Constructors

MethodChannelUssdHandler()

Properties

hashCode → int
The hash code for this object.
no setterinherited
methodChannel → MethodChannel
The method channel used to interact with the native platform.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelMultiSession() → Future<Map<String, dynamic>>
Cancels the active multi-session USSD session
override
checkPhonePermissions() → Future<bool>
Check if the package has the CALL_PHONE and READ_PHONE_STATE permissions.
override
executeUssd(String ussdCode, {int? subscriptionId}) → Future<UssdResponse>
Executes a USSD code
override
executeUssdDirect(String ussdCode, int timeoutSeconds, {int? subscriptionId, bool iosFallbackToStandard = false}) → Future<String?>
Executes a USSD code directly and gets the response without showing the native system dialog (Android only)
override
getPlatformVersion() → Future<String?>
Returns the OS version string, e.g., "Android 13" or "iOS 17.0".
override
getSystemInfo() → Future<Map<String, dynamic>?>
Gets system information and device capabilities for diagnostics.
override
hasUssdDirectPermissions() → Future<bool>
Checks if it has the necessary permissions for direct USSD
override
isAccessibilityServiceEnabled() → Future<bool>
Checks if the accessibility service is enabled
override
isMultiSessionActive() → Future<bool>
Checks if there is an active multi-session USSD session
override
isPermissionPermanentlyDenied() → Future<bool>
Returns true if the user checked the "Don't ask again" option. Always returns false on iOS.
override
isUssdSupported() → Future<bool>
Checks if the device supports USSD codes
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAccessibilitySettings() → Future<bool>
Opens the accessibility services settings
override
openAppSettings() → Future<bool>
Opens the application settings screen in the operating system.
override
requestPhonePermissions() → Future<bool>
Requests the necessary permissions natively, without third-party dependencies.
override
sendMessageInSession(String message) → Future<Map<String, dynamic>>
Sends a message in the active multi-session USSD session
override
setupAccessibilityEventChannel() → Future<Map<String, dynamic>>
Configures the event channel for the accessibility service
override
shouldShowPermissionRationale() → Future<bool>
Indicates whether an explanation should be shown to the user (Temporarily denied)
override
startMultiSessionUssd(String ussdCode, {int? subscriptionId}) → Future<Map<String, dynamic>>
Starts a multi-session USSD session
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited