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

files reset when state change #56

Open
yudomaryanto opened this issue Feb 13, 2023 · 4 comments
Open

files reset when state change #56

yudomaryanto opened this issue Feb 13, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@yudomaryanto
Copy link

yudomaryanto commented Feb 13, 2023

Environment

Package version:
form_builder_file_picker: ^2.3.0

Flutter doctor
  • Doctor summary (to see all details, run flutter doctor -v):
  • [✓] Flutter (Channel stable, 3.7.0, on macOS 13.2 22D49 darwin-arm64, locale en-ID)
  • [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
  • [✓] Xcode - develop for iOS and macOS (Xcode 14.2)
  • [✓] Chrome - develop for the web
  • [✓] Android Studio (version 2022.1)
  • [✓] VS Code (version 1.75.0)
  • [✓] Connected device (3 available)
  • [✓] HTTP Host Availability
Code sample
if (type == 'filepicker') {
      return FormBuilderFilePicker(
        name: 'filepicker_datum$page',
        validator: FormBuilderValidators.required(errorText: 'Jawaban wajib diisi!'),
        decoration: const InputDecoration(labelText: 'Attachments'),
        maxFiles: 1,
        previewImages: true,
        onChanged: (val) {},
        typeSelectors: [
          TypeSelector(
            type: FileType.any,
            selector: Row(
              children: const <Widget>[
                Icon(Icons.attachment),
                Gap(8),
                Text('Pilih Berkas'),
              ],
            ),
          )
        ],
        onFileLoading: (val) {
          debugPrint(val.toString());
        },
        onSaved: (newValue) {},
        // customFileViewerBuilder: customFileViewerBuilder,
      );
    }

Description

i am using pageview, when finished fetching files, the list of files that have been fetxhed is reset to null.

Expected behavior:
file lists persists

Current behavior:
files reset

Video

jforms.mp4
@yudomaryanto yudomaryanto added the bug Something isn't working label Feb 13, 2023
@deandreamatias
Copy link
Contributor

@yudomaryanto please fill all info in the template (flutter doctor, minimal code sample and package version)
Thanks

@deandreamatias deandreamatias added the awaiting author response Waiting for author of issue to respond with more info label Feb 13, 2023
@yudomaryanto
Copy link
Author

@yudomaryanto please fill all info in the template (flutter doctor, minimal code sample and package version) Thanks

done update, thanks

@deandreamatias deandreamatias removed the awaiting author response Waiting for author of issue to respond with more info label Feb 13, 2023
@deandreamatias
Copy link
Contributor

Hi @yudomaryanto
This happens with other fields of FlutterFormBuilder package? I don't sure if this is related to the field our to your state management implementation

@OmarZakiAli
Copy link

I have same issue , it only occurs with this field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants