form_bloc icon indicating copy to clipboard operation
form_bloc copied to clipboard

addFieldBlocs and removeFieldBlocs issue

Open nawaf-na1807684 opened this issue 1 year ago • 1 comments

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: image

nawaf-na1807684 avatar Dec 03 '22 23:12 nawaf-na1807684