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
mask for IP v4 Address #60
Comments
any update? i am having same issue |
Using the RegEx provided by @insinfo , the result is that whatever number is inputted into the field, the RegEx is matched. This means that the outcome in the TextField is always the same, four single digits separated by '.'. I spent some time thinking about it and I do not believe there is a solution to accurately display the IPv4 mask. Think about the following addresses:
Both are valid adresses and contain the same set of digits in the same order but are completely different. Since both values are valid, what criteria should be used for the mask? It is something only the user can define. The best option would be to render a Here's a sample: import 'package:flutter/material.dart';
class TextFormFieldRow extends StatelessWidget {
const TextFormFieldRow({super.key});
@override
Widget build(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
for (var i = 0; i < 4; i++) ...[
SizedBox(
height: 40,
width: 50,
// Customize TextFormField here
child: Center(child: TextFormField()),
),
Text('.'),
]
]..removeLast(),
);
}
}
|
Hi, I would like to mask IP Address in TextFormField. The following code is partially written and does not work. Please advice.
The text was updated successfully, but these errors were encountered: