releans_verify 1.0.0 copy "releans_verify: ^1.0.0" to clipboard
releans_verify: ^1.0.0 copied to clipboard

outdated

releans verify plugin

releans_verify #

In this plugin, you can send and verify OTP through relens API

import #

import 'package:releans_verify/releans.dart';

init releans #

  • copy API key from releans dashboard and set the apiKey
  • create sender from releans dashboard and set the sender
void main() async {
  ReleansVerify().init(
      apiKey: "XXXXXXXXXXXXXXXXX",
      sender: "XXXXXXXXX");
  runApp(MyApp());
}

send OTP #

  • call sendCode with mobile number
  • mobile number should contain the country code
  • specify channel (default is sms)
  ReleansResult result =
  await ReleansVerify().sendCode(mobile: "+9715200000");

verify OTP #

  • call verifyCode with user entered code and mobile number
 ReleansResult result = await ReleansVerify().verifyCode(
                          code: "0000", mobile:"+9715200000");

handle result #

  • ReleansResult object will return after sendCode and verifyCode methods
  • view response message by using reult.message
  • check request is success by using result.isSuccess()

Authors #