Prerequisites

Install the OTPLESS SDK dependency by running the following command in your terminal at the root of your Flutter project before utilizing OtplessSecureService:

flutter pub add otpless_flutter:2.2.1
flutter pub get

Step 1: Add OtplessSecureService dependencies

To integrate OtplessSecureService into your project, include the following dependency in your app-level build.gradle file under the dependencies section:

In your project-level build.gradle, add the following:

Make sure to sync your project with Gradle after adding this dependency.

Step 2: Instantiate the Otpless Plugin

Create an instance of Otpless in your dart file.

Step 3: Attach OtplessSecureService in initState()

In the initState() method of your widget, attach the OtplessSecureService using your APP_ID. This ensures the secure service is properly initialized on Android platforms.

Attach the Secure SDK:

Replace YOUR_APP_ID with your actual App ID provided in your OTPLESS dashboard.