Coder Social home page Coder Social logo

lokesh-sudhakar / flutter-otpscreen Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 7.0 194 KB

A new Flutter package which helps developer in creating Otp screen with few lines of code.

License: Other

Dart 88.48% Java 1.00% Swift 2.63% Objective-C 0.25% HTML 7.64%

flutter-otpscreen's People

Contributors

lokesh-sudhakar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

flutter-otpscreen's Issues

Render Overflow Error

In otp_screen.dart, inside _getOtpKeyboard method, All rows are not Closed with Expended or Flexible Widget, due to this in some devices I got the following error related to Rendering:
======== Exception caught by rendering library ===================================================== The following assertion was thrown during layout: A RenderFlex overflowed by 50 pixels on the bottom.

Please update ASAP

image

hello

wassup added cool

  • New issue
  • cool this is how issue works
  • awesome
  • ckjghj
  • new issur
  • xhccc
  • ther is crash in home screen
  • new crash occured
  • new issue found
  • new issue found
  • crash found in home screen
  • crash happening on drag n drop
  • cool ne issue

renderflow occuring

image

CODE:
import 'package:flutter/material.dart';
import 'package:otp_screen/otp_screen.dart';

import 'package:blog_app/pages/WelcomePage.dart';

class Otp extends StatelessWidget {
static const routeName = '/otp-screen';

Future validateOtp(String otp) async {
await Future.delayed(Duration(milliseconds: 2000));
if (otp == "123456") {
return null;
} else {
return "Incorrect OTP";
}
}

void moveToNextScreen(context) {
Navigator.of(context)
.pushNamedAndRemoveUntil(WelcomePage.routeName, (route) => false);
}

@OverRide
Widget build(BuildContext context) {
return OtpScreen.withGradientBackground(
topColor: Colors.white,
bottomColor: Colors.green[200],
icon: Icon(
Icons.email,
color: Colors.green,
),
otpLength: 6,
validateOtp: validateOtp,
routeCallback: moveToNextScreen,
title: "OTP Verification",
subTitle: "Enter the code sent to your email address",
titleColor: Colors.black,
themeColor: Colors.black,
);
}
}

How to auto-populate the fields?

So i have another function that is same with gcash. it allows to auto populate the text fields once the user receive the otp.

The logic behind it good now but I'm not sure on how can I auto populate the code in text field and pragmatically insert data on it

Flutter Toast Dependency Conflict

Getting Error

Because every version of otp_screen depends on fluttertoast ^6.0.1 and mars_remedies depends on fluttertoast ^7.1.1, otp_screen is forbidden.

How to hide OTP Code ?

I want to use this plugin for pin verification. but when I press code the code visible/ shown to user. my need is to hide scret code for user view. I check not thing variable for setting hidden input number. How to hide OTP Code / Pin ?
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.