flutter_test from sdk depends on collection 1.18.0 // The method 'withValues' isn't defined for the class 'Color'.

Project Settings

Since a few days I get this error in VS Code when trying to run a downloaded flutterflow app,

I appreciate any help, thanks!



Launching lib/main.dart on Chrome in debug mode...

lib/flutter_flow/flutter_flow_util.dart:389:35: Error: The method 'withValues' isn't defined for the class 'Color'.

- 'Color' is from 'dart:ui'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'.

Color applyAlpha(double val) => withValues(alpha: val);

^^^^^^^^^^

Failed to compile application.

Exited (1).

This might be, because also before running downloaded flutterflow code I need to downgrade lately:

Note: collection is pinned to version 1.18.0 by flutter_test from the flutter SDK.

See https://dart.dev/go/sdk-version-pinning for details.

2

Because every version of flutter_test from sdk depends on collection 1.18.0 and testApp depends on collection 1.19.0, flutter_test from sdk is forbidden.

So, because testApp depends on flutter_test from sdk, version solving failed.

2

You can try the following suggestion to make the pubspec resolve:

* Consider downgrading your constraint on collection: flutter pub add collection:^1.18.0

Exited (1).

What have you tried so far?

no idea what to do here

Did you check FlutterFlow's Documentation for this topic?
No
3
7 replies