We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import 'package:flutter/material.dart'; import 'package:flutter_otp_text_field/flutter_otp_text_field.dart';
class OtpScreen extends StatefulWidget { @OverRide _OtpState createState() => _OtpState(); }
class _OtpState extends State { @OverRide Widget build(BuildContext context) { return Scaffold( appBar: AppBar( automaticallyImplyLeading: false, // leading: IconButton( // icon: Icon( // Icons.keyboard_backspace, // ), // onPressed: ()=>Navigator.pop(context), // ), centerTitle: true, title: Text( "OTP", ), elevation: 0.0, ),
body: Container( child: Padding( padding: EdgeInsets.all(8.0), child: OtpTextField( numberOfFields: 5, borderColor: Color(0xFF512DA8), showFieldAsBox: true, onCodeChanged: (String value) { }, onSubmit: (String verificationCode){ //navigate to different screen code goes here showDialog( context: context, builder: (context){ return AlertDialog( title: Text("Verification Code"), content: Text('Code entered is $verificationCode'), ); } ); }, // end onSubmit ), // end PinEntryTextField() ), // end Padding() ), );
} }
My code
The text was updated successfully, but these errors were encountered:
In my case giving enabledBorderColor a color value solved the issue.
enabledBorderColor
Sorry, something went wrong.
looks like I should provide a default value for enabledBorderColor - will do that and update the package. Thanks
No branches or pull requests
import 'package:flutter/material.dart';
import 'package:flutter_otp_text_field/flutter_otp_text_field.dart';
class OtpScreen extends StatefulWidget {
@OverRide
_OtpState createState() => _OtpState();
}
class _OtpState extends State {
@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
// leading: IconButton(
// icon: Icon(
// Icons.keyboard_backspace,
// ),
// onPressed: ()=>Navigator.pop(context),
// ),
centerTitle: true,
title: Text(
"OTP",
),
elevation: 0.0,
),
}
}
My code
The text was updated successfully, but these errors were encountered: