Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dart Analyze Error] A value of type 'Color (where Color is defined in *sky_engine/lib/ui/painting.dart)' can't be assigned to a variable of type 'Color (where Color is defined in */faker-2.2.0/lib/src/colors.dart)'. #76

Open
XiFengLang opened this issue Aug 22, 2024 · 4 comments

Comments

@XiFengLang
Copy link

dart analyze failed when use Color class in test。

version: 2.2.0

A value of type 'Color (where Color is defined in *sky_engine/lib/ui/painting.dart)' can't be assigned to a variable of type 'Color (where Color is defined in */faker-2.2.0/lib/src/colors.dart)'.
@r-durao-pvotal
Copy link

We ran into this issue as well.

A temporary workaround is to hide Color from this lib.

import 'package:faker/faker.dart' hide Color;

@r-durao-pvotal
Copy link

It also happens with Image

@drager
Copy link
Owner

drager commented Aug 22, 2024

Where would this problem be in faker's code? I see nothing from the pub analysis: https://pub.dev/packages/faker/score/log.txt

@r-durao-pvotal
Copy link

Where would this problem be in faker's code? I see nothing from the pub analysis: https://pub.dev/packages/faker/score/log.txt

Our test code hade some like this:

import 'flutter/material.dart';
import 'package:faker/faker.dart';

final color = Colors.light_green;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants