lokesh-sudhakar / flutter-otpscreen Goto Github PK
View Code? Open in Web Editor NEWA new Flutter package which helps developer in creating Otp screen with few lines of code.
License: Other
A new Flutter package which helps developer in creating Otp screen with few lines of code.
License: Other
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
This is body
This is body
wassup added cool
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,
);
}
}
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 is not working?
This is body
Hello, we would love to see the progressive bar having the same color as the theme color. We appreciate your work that is why we give new suggestions.
wassup
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.