autofill signin details

This commit is contained in:
2024-10-23 14:26:17 +02:00
parent 013baa22bd
commit 4467da83b9
3 changed files with 244 additions and 224 deletions

View File

@@ -6,6 +6,7 @@ class MIHPassField extends StatefulWidget {
final String hintText;
final bool required;
final bool signIn;
final Iterable<String>? autoFillHintGroup;
const MIHPassField({
super.key,
@@ -13,6 +14,7 @@ class MIHPassField extends StatefulWidget {
required this.hintText,
required this.required,
required this.signIn,
this.autoFillHintGroup,
});
@override
@@ -128,6 +130,7 @@ class _MIHPassFieldState extends State<MIHPassField> {
@override
Widget build(BuildContext context) {
return TextField(
autofillHints: widget.autoFillHintGroup,
controller: widget.controller,
style: TextStyle(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor()),

View File

@@ -6,6 +6,7 @@ class MIHTextField extends StatefulWidget {
final String hintText;
final bool editable;
final bool required;
final Iterable<String>? autoFillHintGroup;
const MIHTextField({
super.key,
@@ -13,6 +14,7 @@ class MIHTextField extends StatefulWidget {
required this.hintText,
required this.editable,
required this.required,
this.autoFillHintGroup,
});
@override
@@ -75,6 +77,15 @@ class _MIHTextFieldState extends State<MIHTextField> {
});
}
// List<AutofillGroup> getAutoFillDetails(){
// if(widget.autoFillHintGroup == null){
// return [];
// }
// else{
// return widget.autoFillHintGroup!;
// }
// }
Widget setRequiredText() {
if (widget.required) {
return Row(
@@ -116,6 +127,7 @@ class _MIHTextFieldState extends State<MIHTextField> {
@override
Widget build(BuildContext context) {
return TextField(
autofillHints: widget.autoFillHintGroup,
style: TextStyle(
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
),