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

"type 'double' is not a subtype of type 'int'" calling Color.css('rgba(27,31,35,0.1)') #88

Closed
DanTup opened this issue Mar 5, 2019 · 1 comment

Comments

@DanTup
Copy link

DanTup commented Mar 5, 2019

Running in Dart 2.2, this code:

final a = Color.css('rgba(27,31,35,0.1)');

throws:

type 'double' is not a subtype of type 'int'
#0      Color._convertCssToArgb 
../…/src/property.dart:281
#1      new Color.css 
../…/src/property.dart:92
#2      main 
#3      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:300:19)
#4      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

Presumably it's because the args are parsed as doubles (args.add(double.parse(param));) but the signature of convertToHexString expects ints for the first three params.

@Schnurber
Copy link

Same problem!

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

2 participants