widget_toolkit_pin library

Classes

PinCodeBloc
PinCodeBlocEvents
A contract class containing all events of the PinCodeBloc.
PinCodeBlocStates
A contract class containing all states of the PinCodeBloc.
PinCodeCustomKey
PinCodeCustomKeyState
PinCodeKeyboard
This Widget builds custom numeric keyboard on the screen. It presents three columns with numbers from 1 to 9 in three rows. Below them is the zero, there are in the two customizable button options on the right direction. To define them use deleteKeyButton and/or bottomRightKeyboardButton. The right button by default can be is an auto submit button, delete button and biometrics button. When the widget is loaded for the first time, on the bottom right of the page there is no button. At this moment the biometrics for the app are still not enabled. After at least 1 number has been selected the delete button shows up. When the length of the input has reached the pin code length, the button icon disappears. The pin code is encrypted and stored in the local device secure storage. Then, there is an auto submit for the selected pin code to the backend for verification. When the pin code is submitted, the widget should present to the user that the pin verification is in progress with loading animation. Over the masked pin a Shimmer will be presented and buttons will change their appearance. The pin code from the input is auto submitted once its length reaches the returned value from PinCodeService.getPinLength(), which should return a value less than 10. After the pin has been saved successfully in the secure storage, the biometrics icon appear on the bottom right. When you press it, it triggers enabling of the biometrics event. The local authentication from the local_auth package is triggered. The user is asked, if he/she wants to allow the app to use biometrics authentication. When he/she clicks ok, the biometrics authentication is triggered. When it is successful, on the screen is displayed a message that the biometrics are enabled. The next time when the app is restarted, because the pin code will be stored in the device secure storage, the biometrics authentication will be automatically triggered and the biometrics icon will be displayed on the bottom right. When you press it every time it will trigger the biometric authentication. Note: If biometricsLocalDataSource parameter is not provided to PinCodeKeyboard the biometrics authentication feature cannot be used.
PinCodeService
PinCodeTheme

Exceptions / Errors

ErrorWrongPin
This error can be thrown from the service layer, when the user types a wrong pin code. When the PinCodeComponent widget receives this error a shake animation will be triggered on the masked pin code keys, then they disappear and the text from the errorMessage will be displayed on the screen.