Error building after adding a library and inserting a component to my project

Troubleshooting

Steps to reproduce:

I created a library (Publish as Library) in my "my-library-581ace" project with everything default but one simple component ("myComponent"), no firebase, no further configuration of the project.

Then, I added the library "my_library" as a dependency in "my-project-478bek".

Next, added the component "myComponent" onto one of the project pages.

It tries to compile, but after three minutes I get this error:

Compilation error

59 packages have newer versions incompatible with dependency constraints.
Try flutter pub outdated for more information.
Launching lib/main.dart on Web Server in debug mode...
Waiting for connection from debug service on Web Server...      
dependencies/my_library_581ace/lib/flutter_flow/debug_util.dart:120:34: Error: Member not found: 'themeMode'.

                 FlutterFlowTheme.themeMode.name,
                                 ^^^^^^^^^
Waiting for connection from debug service on Web Server...        174.0s
Failed to compile application.

I tried adding a theme widget on the library hoping that it may fix it and published a new version, but there was no joy.

Anyone else had similar issues with library components like this?

What have you tried so far?

I tried adding a theme widget on the library hoping that it may fix it and published a new version, but there was no joy.

Edit:

  • I created a new empty project and added the library as a dependency. Then added the component to HomePage and it build correctly.

  • Added a new Theme Widget for label in the new Project and it builds fine

  • Added a new Theme Widget for dropdown in the new Project and it builds fine too

So the issue must be in the original project, not on the library. I am trying to remove everything from the original project but still doesn't build until I remove the component from the page where it is.

Did you check FlutterFlow's Documentation for this topic?
Yes
4
2 replies