FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
106 stars 18 forks source link

Custom Widget not update when change parameter #2788

Open haihai1993 opened 2 months ago

haihai1993 commented 2 months ago

Has your issue been reported?

Current Behavior

I clone project from from document : https://docs.flutterflow.io/customizing-your-app/custom-functions/custom-widgets In 7. Use custom widget on page you can see when change parameter strokeWidth the custom widget will change.But when i clone project and change strokeWidth.The UI still the same

https://github.com/FlutterFlow/flutterflow-issues/assets/13572488/66e07688-fdf0-422a-83c2-8dbade91d1a8

Expected Behavior

Custom Widget update when change parameter like example

https://github.com/FlutterFlow/flutterflow-issues/assets/13572488/fdbc3a32-74b1-465b-bb47-5bded34107dc

Steps to Reproduce

  1. Clone project from : https://app.flutterflow.io/project/dotted-border-demo-9gj1al
  2. Change paramete StrokeWidth from 10 to 100
  3. Preview UI not change

Reproducible from Blank

Bug Report Code (Required)

IT4KlMmB2892odxE7ZCBYPlFmik5Jlgja4JFlu5+dw4gIrb2G7YMS8+kMxJVXemndGNEL02JmnIzptKOv9mXA+UqNk6Cc4hJzpF6VRfxWn6jbr6TEc6OYXR6HeFJJVyd1sKRrh5+NupsSCVi1EymOfO/VinsH4DjNUURH8qLJp74ol2pQ0SLb3kNh1JWeC/v

Context

I build a custom widget to reproduce in my app,but i can't see anything parameter when i change.It's difficult to me to develop new feature

Visual documentation

https://docs.flutterflow.io/customizing-your-app/custom-functions/custom-widgets

Additional Info

No response

Environment

- FlutterFlow version: v4.1.34+
- Platform: macOS, Windows and web version of the flutterflow app.
- Browser name and version: Google Chrome
- Operating system and version affected:

General

Relative to the time the changes were made, data was lost within

When following my steps to reproduce, data loss happens

iam-thaibinh commented 2 months ago

Facing the same issue

image

NhatCao2319 commented 2 months ago

Same issue here. It just show the last save of preview custom widget code.

rzambroni commented 2 months ago

Hey everyone, thanks for the report, I was checking the demo project and it seems to be incomplete.
It is missing the path_drawing dependency and the import of that package as well.

I was able to make it work after fixing that. (see screenshot). If you follow along the tutorial it has te correct steps and you will end up with the correct solution.

I'll make an internal request to see if we can fix the demo project. Sorry about the confusion!

image.png
haihai1993 commented 2 months ago

Hi @rzambroni Thanks for the reply, but please check the video. I added the path_drawing dependency. In preview mode, it works perfectly, but when I add the custom widget to the Widget tree and change the strokeWidth or Color, the widget remains the same.

https://github.com/FlutterFlow/flutterflow-issues/assets/13572488/db729774-31c7-44ac-ae5b-75f049f2405e

rzambroni commented 2 months ago

Thanks for clarifying @haihai1993, i misunderstood and did not go that far. I was able to replicate this. Will send it to the team so they can take a look.

Thanks for flagging.

haihai1993 commented 2 months ago

Hi @rzambroni Any updates on this bug?