startConsent static method

void startConsent(
  1. SmsListener listener, [
  2. String? phoneNumber
])

Enables the service of reading SMS messages until the SMS messages that meet the rules are obtained or the service times out (the timeout duration is 5 minutes).

Implementation

static void startConsent(SmsListener listener, [String? phoneNumber]) {
  _listener = listener;
  _c.invokeMethod("smsWithPhoneNumber", {'phoneNumber': phoneNumber});
}