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

How to init value? #6

Open
vanndev opened this issue Mar 25, 2024 · 0 comments
Open

How to init value? #6

vanndev opened this issue Mar 25, 2024 · 0 comments

Comments

@vanndev
Copy link

vanndev commented Mar 25, 2024

SimpleChipsInput(
paddingInsideWidgetContainer: const EdgeInsets.symmetric(horizontal: 16, vertical: 5),
formKey: formKeyEmail,
textFormFieldStyle: TextFormFieldStyle(keyboardType: TextInputType.emailAddress, cursorColor: Theme.of(context).primaryColor),
separatorCharacter: ",",
validateInput: true,
validateInputMethod: (String value) {
final emailRegExp = RegExp(r'^[\w-.]+@([\w-]+.)+[\w-]{2,4}$');
if (!emailRegExp.hasMatch(value)) {
return 'Enter a valid email address';
}
},
onChanged: (value) {},
onSubmitted: (p0) {},
onChipDeleted: (p0, p1) {},
onSaved: ((p0) {
onChangeEmail!(p0);
}),
chipTextStyle: text14(context),
deleteIcon: Padding(
padding: const EdgeInsets.only(left: 5),
child: CircleAvatar(
maxRadius: 10,
backgroundColor: Theme.of(context).bgColor8063(context),
child: const Icon(Icons.close_rounded, size: 14.0, color: Colors.white),
),
),
marginBetweenChips: const EdgeInsets.symmetric(vertical: 4),
widgetContainerDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
border: Border.all(color: Theme.of(context).bgColorCC3A(context)),
),
chipContainerDecoration: BoxDecoration(
color: Theme.of(context).bgColorB356(context).withOpacity(0.2),
borderRadius: BorderRadius.circular(30.0),
),
placeChipsSectionAbove: true,
),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant