This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Auto Adjust Width missing #39
Comments
hot solution final maxLength = 4;
final pinBoxWidth = 60.0;
final pinBoxBorderWidth = 2.0;
final pinBoxOuterPadding = EdgeInsets.symmetric(horizontal: 4.0);
var width = 0.0;
for (var i = 0; i < maxLength; i++) {
width += pinBoxWidth;
if (i == 0) {
width += pinBoxOuterPadding.left;
} else if (i + 1 == maxLength) {
width += pinBoxOuterPadding.right;
} else {
width += pinBoxOuterPadding.left + pinBoxOuterPadding.right;
}
}
final confirmationCodeInput = SizedBox(
width: width,
child: PinCodeTextField(
isCupertino: true,
autofocus: true,
maxLength: maxLength,
pinBoxOuterPadding: pinBoxOuterPadding,
pinBoxWidth: pinBoxWidth,
pinBoxHeight: 85,
pinBoxColor: Colors.grey[100],
pinBoxRadius: 8,
defaultBorderColor: Colors.grey[100],
hasTextBorderColor: Colors.grey[100],
errorBorderColor: Colors.red[200],
pinBoxBorderWidth: pinBoxBorderWidth,
),
); |
LiewJunTung
added a commit
that referenced
this issue
May 26, 2020
Fixed cursor in cupertino, fixed #39, fixed textarea for paste code
LiewJunTung
added a commit
that referenced
this issue
May 26, 2020
* Fixed cursor in cupertino, fixed #39, fixed textarea for paste code by [SergeShkurko](https://github.com/LiewJunTung/pin_code_text_field/issues?q=is%3Apr+author%3ASergeShkurko) * Added highlighted pinBox backgroundColor by [heymars](https://github.com/LiewJunTung/pin_code_text_field/issues?q=is%3Apr+author%3Aheymars) * Implementation hide default keyboard by [luffynas](https://github.com/LiewJunTung/pin_code_text_field/issues?q=is%3Apr+author%3Aluffynas)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have been using "auto adjust width" but this seems to have disappeared in the latest version. What is the alternative?
pinCodeTextFieldLayoutType: pinCodeTextFieldLayoutType.AUTO_ADJUST_WIDTH,
The text was updated successfully, but these errors were encountered: