otpless_flutter_web 0.1.0 copy "otpless_flutter_web: ^0.1.0" to clipboard
otpless_flutter_web: ^0.1.0 copied to clipboard

Platformweb

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: ^0.1.0

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();
}
3
likes
140
points
59
downloads

Publisher

unverified uploader

Weekly Downloads

Otpless Flutter Web support

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on otpless_flutter_web