PinChange class abstract

The object that can be used to change the PIN.

Usage example:

  class PinChangerImpl implements PinChanger {
    @override
    void changePin(PinChangeContext context, PinChangeHandler handler) {
      handler.pins(oldPin, newPin);
    }
  }

  [...]
  Future<void> changePin({
    required MobileAuthenticationClient client,
    required String username,
  }) async {
    await client.operations.pinChange
      .username(username)
      .pinChanger(PinChangerImpl(...))
      .onSuccess(() {
        // handle success
      })
      .onError((error) {
        // handle error
      })
      .execute();
  }
  [...]

Constructors

PinChange()

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

execute() → Future<void>
Executes the operation asynchronously.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError(dynamic onError(PinChangeError)) PinChange
Specifies the object that will be invoked when the PIN could not be changed: the PIN was not enrolled, the PIN is locked or the operation was canceled.
onSuccess(Function onSuccess) PinChange
Specifies the object that will be invoked if the PIN was successfully modified.
pinChanger(PinChanger pinChanger) PinChange
Specifies the object that will be informed of the potential recoverable errors and is responsible for obtaining the PIN from the end-user.
toString() → String
A string representation of this object.
inherited
username(String username) PinChange
The username whose PIN must be changed.

Operators

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