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

addFieldBlocs and removeFieldBlocs issue #327

Open
nawaf-na1807684 opened this issue Dec 3, 2022 · 1 comment
Open

addFieldBlocs and removeFieldBlocs issue #327

nawaf-na1807684 opened this issue Dec 3, 2022 · 1 comment

Comments

@nawaf-na1807684
Copy link

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

@vasilich6107
Copy link

#312 (comment)

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

2 participants