flutter-form-builder-ecosystem / form_builder_file_picker

File picker field widget for FlutterFormBuilder.
https://pub.dev/packages/form_builder_file_picker
BSD 3-Clause "New" or "Revised" License
15 stars 33 forks source link

Error: 'decoration' isn't a function or method and can't be invoked. #19

Closed jvmdo closed 2 years ago

jvmdo commented 2 years ago

Hi, this error occurs when I try to use the extra plugin with the form_builder package

.../form_builder_file_picker-1.2.0-nullsafety.3/lib/src/form_builder_file_picker.dart:91:43: Error: 'decoration' isn't a function or method and can't be invoked.
              decoration: state.decoration(),
sanamdongol commented 2 years ago

@jvmdoeng16 did you fixed this issue? I'm also having this issue

rsree1210 commented 2 years ago

Facing the same issue. Any solution for this?

ahmadesat commented 2 years ago

Will the developers fix this issue? It has been a week already and my project strongly depends on this plugin

ravi-bebble commented 2 years ago

Same issue!! Any Updates or Work arounds?

bhardwajsuresh commented 2 years ago

The fix is quite simple. The developer should fix the code asap.

just change line number 91 from "decoration: state.decoration()," to "decoration: decoration," in file form_builder_file_picker.dart

as a workaround you can change this in file "<FLUTTER DIR>\.pub-cache\hosted\pub.dartlang.org\form_builder_file_picker-1.2.0-nullsafety.3\lib\src\form_builder_file_picker.dart" the code shall compile and work successfully,

Do remember that the file may be overwritten when you run "pub get" etc.

flutterfromscratch commented 2 years ago

I patched the issue and did a version bump on the dependencies in my fork of this plugin. So, in your pubspec.yaml you can add my patched version to get your stuff working for now.

  form_builder_file_picker:
    git: https://github.com/flutterfromscratch/form_builder_file_picker

If there isn't a PR for this I'll put one in as well...

flutterfromscratch commented 2 years ago

Put in a PR for this, hopefully it gets merged in soon. Until then, feel free to use my fork to get your stuff sorted 😄