FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
98 stars 17 forks source link

"custom_icons.dart" and "pubspec.yml" out of date when downloading source code #2837

Open phil528i opened 2 weeks ago

phil528i commented 2 weeks ago

Has your issue been reported?

Current Behavior

I'm using a Team Design Library within my project and I recently added a second set of custom icons. The first icon file added here many months ago appears to be fine, but the second and most recent addition isn't working.

  1. Everything appears to work from the FlutterFlow website.
  2. The first time I opened my project using the new icons from the FlutterFlow Windows desktop app, it loaded fine but failed to render successfully saying those icons were missing. Then reselecting the project appears to have fixed that issue.
  3. But downloading the code and attempting to build it from VS Code shows the icons are indeed not specified in the custom_icons.dart file. Again, reference to the first icon file a long time ago is there. Just not the most recent one. Also noticed that the pubspec.yml has no mention of the second icon file. Only the first is listed there.

Expected Behavior

Downloading the source code to build locally should be identical to the code being previewed online or in the desktop app. It clearly isn't.

Steps to Reproduce

  1. Add a new icon file to your Team Design Library and reference any of those icons in a project.
  2. Add another file and reference any of those.
  3. Download the code and load the project in VS Code.
  4. Get an error that those enum names don't exist.

Reproducible from Blank

Bug Report Code (Required)

IT4gi8mAw49OsdgB+ZfQae9VlmU7Nm5+a4c0rNx+bw4bI+PqPYocfODCQFJBYuqHTAk3AlSgmnMy0dL6vfzuUfVfPRGdG75A/qlxUxDhTl2lMZjSCLqRPkZ5EftWBUy+yMOvpyVRCLRuV38j3Tu2AuSub3qCf9qOYwx5e6fDbOY=

Context

I can't build my project.

Visual documentation

Missing definitions in custom_icons.dart:

image

Additional Info

No response

Environment

- FlutterFlow version: 4.1.15+
- Platform: Windows 11
- Browser name and version: Chrome, latest.
- Operating system and version affected: Windows.

General

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

When following my steps to reproduce, data loss happens

ignalauret commented 2 weeks ago

Hey @phil528i thanks for your report. I just created a project, added two Icon files to it and added two Icon widgets with icons of each IconSet, and everything is looking fine when I download the code.

Screenshot 2024-05-02 at 4.39.46 PM.png

Could you try reproducing your issue from a Blank project and sharing with me the Debug code for it?

phil528i commented 2 weeks ago

@ignalauret , I'll do as you ask shortly. In the meantime, I thought that I'd share how this issue has evolved since yesterday (or the day before). Here is a screenshot of those same files including a comparison to the FlutterFlow UI. There is now a duplicate entry in the generated files still causing a build error. I think there was temporarily a duplicate entry in the FlutterFlow UI but it appears to be gone, but still leaving the duplicate entries in the duplicated code. No idea why, but it's a reversal of the original problem almost (no idea what's going on under the hood).

image
ignalauret commented 2 weeks ago

Thanks! Yes, checking at your project, I could see that some how you managed to add duplicated Icon Files (with the same name). I tried doing that on my project but the UI didn't let me (It correctly gave an error telling me that the Icon family already existed). So, could you please remove the extra Icon file called "Treatments" and download your code again? Let me know if this fixed the issue since it will give us more information on the bug.

phil528i commented 2 weeks ago

So, could you please remove the extra Icon file called "Treatments" and download your code again? Let me know if this fixed the issue since it will give us more information on the bug.

Notice from the screenshot that I don't have a second Treatments entry to remove...

ignalauret commented 2 weeks ago

That's interesting. So, I'm loading your project and I can see duplicated Treatments IconFile

Screenshot 2024-05-02 at 5.26.54 PM.png

Please let me know when you have the Blank Project with the bug reproduced, so I can inform both issues to our technical team, and they can help you out.

phil528i commented 2 weeks ago

Hey @phil528i thanks for your report. I just created a project, added two Icon files to it and added two Icon widgets with icons of each IconSet, and everything is looking fine when I download the code. Could you try reproducing your issue from a Blank project and sharing with me the Debug code for it?

So I can reproduce the original issue with even just attempting to add a single icons file. Here is what I did, and I'm attaching the produced zip file.

  1. Create a new default Teams Design library, give it a name. (don't add any icons yet).
  2. Create a new blank project.
  3. Go to the project's Theme Settings, then Design Systems. Link it to the new Design library from step 1.
  4. Once linked, go to the Design Library and add 1 icons file, also include the included .dart file.
  5. Go back to the project's Theme Settings, then Typography & Icons. Notice it hasn't refreshed yet to reflect the new icons, so refresh the page. They now appear - cool! (I did download the code at this point, and the project was indeed broken as expected, so I thought...)
  6. Let's use the new icon, so add an Icon to the main page and select one of your new icons.
  7. From the top right, select to Download Code.
  8. Open the zip file and notice that:
    1. There is no custom_icons.dart file included,
    2. The pubspec.yml file has no mention of the new icons file.

z_bug01.zip

ignalauret commented 2 weeks ago

Sadly, I'm following your steps and seeing the exported code importing the Custom icons correctly. I will send this to our technical team so they can take a better look at it, I'm sorry I couldn't help you fix it. They will keep you updated on this thread, have a great day!

phil528i commented 2 weeks ago

Wow, that's pretty crazy that we get different results. Thanks for trying!

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.