form_bloc
form_bloc copied to clipboard
addFieldBlocs and removeFieldBlocs issue
I'm using addFieldBlocs and removeFieldBlocs based on SelectFieldBloc changes. The problem is when I use declare: static final EmployerLogo = InputFieldBloc<ElevatedButton?, dynamic>( initialValue: null, validators: [FieldBlocValidators.required], ); and included in widget build in: BlocBuilder<InputFieldBloc, InputFieldBlocState>( bloc: ConditionalFieldsForm.EmployerLogo, builder: (context, state) { return ElevatedButton( onPressed: () async { logo = await ImagePickerServices .getImageAsFile(); if (logo == null) return;
logoUrl = await FirebaseStorageServices
.uploadToStorageAsHTMLFile(
file: logo!,
folderName: StorageFolderNames
.employerFolder);
setState(() {});
},
child: Text(' Upload Employer Logo '),
);
},
),
the changes on SelectFieldBloc doesn't add or remove the button. it is stuck like in the next image: