blusalt_identity 0.0.1-dev.1 blusalt_identity: ^0.0.1-dev.1 copied to clipboard
Blusalt Flutter package for accessing Identity services
blusalt_identity #
Blusalt Flutter package for accessing Blusalt Identity Verification Services
Developers Preview Status #
The Package is a pre-release , all issues should be logged in Issues.
Usage #
To use this plugin, add blusalt_identity_plugin
as a dependency in your pubspec.yaml file.
Getting Started #
-
Get an API key at https://blusalt.io/
-
Initialize the SDK in your app.
import 'package:blusalt_identity/network/blusalt_sdk.dart';
import 'package:blusalt_identity/network/network_client.dart';
ApiCredentials credentials = ApiCredentials(
apiKey: MY_API_KEY,
clientID: MY_CLIENT_ID,
appName: MY_APP_NAME
);
var future = BlusaltSDK.initializeSDK(credentials);
future.then((onValue){
print(onValue);
})
.catchError((onError){
// print(onError);
});
Sample Usage #
import 'package:blusalt_identity/network/blusalt_sdk.dart';
import 'package:blusalt_identity/network/network_client.dart';
import 'package:blusalt_identity/verification_manager.dart' as manager;
///
void verifyBVN(BuildContext context){
initProgressBar(context);
_progressDialog.show();
BVNRequest bvnRequest = BVNRequest(
firstName: "",
lastName: "",
bvnNumber: "",
phoneNumber: ""
);
var response = manager.verifyBVN(bvnRequest);
response.then((onValue){
_progressDialog.dismiss();
showToast(context, onValue.message );
})
.catchError((onError){
_progressDialog.dismiss();
showToast(context, onError.toString());
});
}