otpless_flutter_web 1.0.1 otpless_flutter_web: ^1.0.1 copied to clipboard
Otpless Flutter Web support
This package supports the otpless_flutter web support. For more info please Visit OTPless
otpless_flutter_web #
Installation #
In your index.html
file, add the following code:
<div id="otpless-login-page">
<script src="https://otpless.com/flutter.js"></script>
</div>
In your pubspec.yaml
file, add the following dependency:
dependencies:
otpless_flutter_web: ^1.0.1
In your SignIn/SignUp
dart file, add the following code:
import 'package:otpless_flutter_web/otpless_flutter_web.dart';
final _otplessFlutterPlugin = Otpless();
void otplessLoginPage()async{
await _otplessFlutterPlugin.openLoginPage().then((value){
final data = value.toString();
});
}
//In initState() add the given code
if(_otplessFlutterPlugin.getCodeForParams() != null){
otplessLoginPage();
}
//To you on tap function
onTap : (){
otplessLoginPage();
}