Skip to content
New issue

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

Add the fieldHeight variable. #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/otp_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class OTPTextField extends StatefulWidget {
/// Width of the single OTP Field
final double fieldWidth;

/// Height of the single OTP Field
final double fieldHeight;

/// margin around the text fields
@Deprecated(
"Since there is an issue with the margin because it's around each item, we use [spaceBetween] from now on.")
Expand Down Expand Up @@ -73,6 +76,7 @@ class OTPTextField extends StatefulWidget {
this.width = 10,
this.controller,
this.fieldWidth = 30,
this.fieldHeight = 60,
this.spaceBetween = 0,
this.otpFieldStyle,
this.hasError = false,
Expand Down Expand Up @@ -173,6 +177,7 @@ class _OTPTextFieldState extends State<OTPTextField> {

return Container(
width: widget.fieldWidth,
height: widget.fieldHeight,
margin: widget.margin ??
EdgeInsets.only(
right: isLast ? 0 : widget.spaceBetween,
Expand Down