Compilation Error in ...

Troubleshooting

Hi all, super strange this, but getting the error below with trying to debug in the browser - no errors are raised but then when compiling I get the error below (which I've never seen before after learning FlutterFlow for over a year).


Any thoughts greatly appreciated!

________________________________________________________________________________________________

97 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...

lib/production/main_pages/home/home_widget.dart:259:11: Error: 'canvasSize' is already declared in this scope.

final canvasSize = MediaQuery.sizeOf(context);

^^^^^^^^^^

lib/production/main_pages/home/home_widget.dart:258:11: Context: Previous declaration of 'canvasSize'.

final canvasSize = MediaQuery.sizeOf(context);

^^^^^^^^^^

Waiting for connection from debug service on Web Server... 56.6s

Failed to compile application.

________________________________________________________________________________________________

What have you tried so far?

There isnt anything I've changed in the widget but its now throwing an error, and when Publish to the iOS Testflight, there is no issue and everything compiles/functions.

I've tried rebuilding the widget from scratch but get the same issue, tried looking through the code to see where about "canvasSize" is defined but cant see it anywhere in the code?

Did you check FlutterFlow's Documentation for this topic?
No
4
6 replies