AndroidSmsConsent class

A class to request one-time consent to read an SMS with alphanumeric string.

SMS is listened for only if it meets these criteria:

  • The message contains a 4-10 character alphanumeric string with at least one number.
  • The message was sent by a phone number that's not in the user's contacts.
  • If you specified the sender's phone number, the message was sent by that number.

Constructors

AndroidSmsConsent({required ValueChanged<String> onAllowed, String? pattern, VoidCallback? onDenied, VoidCallback? onTimeout, VoidCallback? onPatternUnmatched})
Creates an instance of AndroidSmsConsent.

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start([String? sender]) → void
Starts listening for incoming messages(with 4-10 character alphanumeric string with at least one number) for the next 5 minutes.
stop() → void
Stops the listener for incoming messages.
toString() String
A string representation of this object.
inherited

Operators

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