mati_plugin_flutter 1.0.0 mati_plugin_flutter: ^1.0.0 copied to clipboard
Flutter plugin for Mati SDK.
Mati Flutter plugin – BETA VERSION #
Installation #
Let's start with setting up dependencies
mati_flutter: path: TODO
And in oreder to use sdk for iOS please add those dependencies to your Podfile
pod 'Mati-Global-ID-SDK'
pod 'Socket.IO-Client-Swift', '~> 15.2.0'
Code #
In order to start Mati verification flow you should сonsecutively call those 2 methods
MatiFlutter.setParams(CLIENT_ID, FLOW_ID, METADATA)
And to listen for verificaiton result please wait for
MatiFlutter.resultCompleter.future
with the code similar to the following
MatiFlutter.resultCompleter.future.then((result) => Fluttertoast.showToast(
msg: result is ResultSuccess ? "Success ${result.verificationId}" : "Cancelled",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM));