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

Fix 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' error on 3.12.0-1.1.pre #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Foldblade
Copy link

Thank you for your work and I really love this package!

I'm using Flutter Channel beta, 3.12.0-1.1.pre. The following error occured when I tried to run my project using skeleton_text 3.0.0:

Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
../lib/skeleton_text.dart:70:49: Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.
 - 'BorderRadius' is from 'package:flutter/src/painting/border_radius.dart' ('/E:/flutter/packages/flutter/lib/src/painting/border_radius.dart').
 - 'BorderRadiusGeometry' is from 'package:flutter/src/painting/border_radius.dart' ('/E:/flutter/packages/flutter/lib/src/painting/border_radius.dart').
              borderRadius: widget.borderRadius as BorderRadius?,
                                                ^

To reproduce, just use the example in this package. (Since the example in this package was too old to run, so I re-generate the example directory to make it runable.)

After a quick search, I found this Flutter PR: Fix nullability of ClipRRect.borderRadius, and it was merged since Flutter channel beta 3.12.0, commit 8fcb74d. So I simply deleted as BorderRadius? in lib/skeleton_text.dart to make it work on 3.12.0-1.1.pre.

Since it was fixed in Flutter 3.12.0 and this version is still in beta channel, so I also made a limitation, flutter: ">=3.12.0-0.0.pre", in pubspec.yaml. SDK version number was set to sdk: ">=2.12.0 <4.0.0" to upgrade to Dart 3.x.

Could you please check this PR and consider releasing a new version? Thanks!

- `flutter create example`, Flutter Channel beta, 3.12.0-1.1.pre
- add windows, linux, macos, web directories
- `lib\skeleton_text.dart`, line 70
- In `pubspec.yaml`, `flutter: ">=3.12.0-0.0.pre"`
@reynirf
Copy link
Contributor

reynirf commented Aug 16, 2023

This error now occurs when using the stable version of Flutter (3.13).

@iamhssingh
Copy link
Member

Can you resolve the conflict @Foldblade ?

@Foldblade
Copy link
Author

@iamhssingh Hello, I've solve the conflict. Please take a look 😉

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

Successfully merging this pull request may close these issues.

None yet

3 participants