-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
The argument type 'double?' can't be assigned to the parameter type 'double' because 'double?' is nullable and 'double' isn't. iconSize: effectiveIconTheme.size, #40
Comments
Hi @Sunsiha, thanks for the report. I'm looking at it. If you have a longer stack trace it might help. Even better if you have a reproduction sample I can use to investigate the issue with. All I can say for now is that, "that's odd, it should not be able to happen". I will also have to look at how the html_editor_enhanced package is using the picker, but however it is, it should not be possible to cause this error, but apparently it it is somehow. |
I am unable to reproduce the issue using the config used in tneotia/html-editor-enhanced#225 I saw the issue mention here too tneotia/html-editor-enhanced#225 tagging it for reference. -- Continuing to look into the issue, but a full stack trace and repro sample would be nice. |
The error message is a bit odd, because in all 5 references that exist in flex_color_picker, with the line:
Where the error message for line 113 is one of them:
The message is odd, since Strange, I must be missing something, but it looks like Flutter source for the Flutter /// The size of the icon inside the button.
///
/// If null, uses [IconThemeData.size]. If it is also null, the default size
/// is 24.0.
///
/// The size given here is passed down to the widget in the [icon] property
/// via an [IconTheme]. Setting the size here instead of in, for example, the
/// [Icon.size] property allows the [IconButton] to size the splash area to
/// fit the [Icon]. If you were to set the size of the [Icon] using
/// [Icon.size] instead, then the [IconButton] would default to 24.0 and then
/// the [Icon] itself would likely get clipped.
final double? iconSize; Still that sounds weird, but I'm almost inclined to suggest you should try to do this:
First and see if it helps. Plus to make sure your IDE is using and pointing to the Flutter version you have installed and that actually gets upgraded when you run Maybe I'm fishing here and missing something, but I just can replicate your issue in my Flutter environment setup. |
Meet the same problem. |
@vietlinhtspt thanks for letting me know, can you send a link to a minimum repo setup that replicates the issue? I would love to see the issue too, but I have been unable to replicate it. Before I apply a fix for it I would like to see and understand what condition creates the issue, because it should not really happen at all based on the analysis I've made of it, but maybe I missed something. Also I need to be able to replicate the issue to make sure it has been fixed with applied fix. |
@Sunsiha I meet this problem in Flutter 2.8.1, after upgrading to Flutter 2.10.2 it works properly. |
Hi @vietlinhtspt, thanks for that info. That is quite interesting though, because there is nothing in the reported error message that would indicate it should not work exactly the in 2.8.1 and I have not been able to reproduce the issue. But OK I think my tests were all with 2.10.x, I can certainly try my own test case with a downgrade to 2.8.1 one too. Using fvm it is easy enough to switch versions. If I'm interpreting the very brief error report correctly, a situation that would cause this error should only happen if for some reason Flutter SDK was at version before 2.0.0 and Dart SDK below 2.12.0 which were none null safe version. Those versions are however not even supported by the package constraints since Dart SDK >= 2.12.0 is required and first Flutter version with it is 2.0.0, This is the reason why I think the reported error is a bit surprising. You can read more about that in submitted PR here #41. There is a simple fix in the PR too, but it is kind of work around, for a problem that as far as I can see should not even exist, and as said I have not seen the issue in my tests But OK I will try I with 2.8.1 and see if I can get the error then too, even if I don't I can merge the PR and do the edits to make it pass the CI/CD Dartfmt style checks too. It is just that if I can't repeat the error I cannot really test if the fix works. So if somebody has a code repo for a minimum reproduction sample, that would help, since then I can first verify that I can repeat the error and that it is gone after the fix. Without that I'm just applying a fix, for a problem that should no exist, but somehow does, that I cannot repeat, and I put the fix in but can't know that it works, only that in theory it certainly looks like it should, if the problem happens that should not be able to happen in the first place. 😃 lol |
Thanks @vietlinhtspt, the info that there was an issue in Flutter 2.8.1 but not in 2.10.x builds helped. Interstingly In any case, I merged the fix, made minor dartfmt update to be able to get it trough its dartfmt CI/CD verification. Tested and verified that the fix, works OK in both 2.8.1 and 2.10.x. Fixed version is available on pub.dev now Thank you all for your help and feedback. Issue closed via #41 |
When I try to run the application getting this error.
Directly am not using this plugin. But one of the plugin(https://pub.dev/packages/html_editor_enhanced) is using this library. So not able to figure it out how to fix it.
The text was updated successfully, but these errors were encountered: