You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BorderRadiusDirectional not supported in BorderRadiusTween #26468
This is still the case on latest stable and master versions:
stable, master flutter doctor -v
[✓] Flutter (Channel stable, 3.3.5, on macOS 12.2.1 21D62 darwin-x64, locale
en-GB)
• Flutter version 3.3.5 on channel stable at
/Users/dhs/documents/fluttersdk/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision d9111f6402 (10 hours ago), 2022-10-19 12:27:13 -0700
• Engine revision 3ad69d7be3
• Dart version 2.18.2
• DevTools version 2.15.0
[!] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.21.0
[✓] Connected device (5 available)
• SM G975F (mobile) • RZ8M802WY0X • android-arm64 • Android 11 (API 30)
• Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 •
ios • iOS 14.4.1 18D61
• iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729 •
ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• macOS (desktop) • macos •
darwin-x64 • Mac OS X 10.15.4 19E2269 darwin-x64
• Chrome (web) • chrome •
web-javascript • Google Chrome 98.0.4758.80
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
[✓] Flutter (Channel master, 3.5.0-6.0.pre.48, on macOS 12.2.1 21D62 darwin-x64,
locale en-GB)
• Flutter version 3.5.0-6.0.pre.48 on channel master at
/Users/dhs/documents/fluttersdk/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5a7224d14a (7 hours ago), 2022-10-17 12:25:57 +0800
• Engine revision 59dea4cddd
• Dart version 2.19.0 (build 2.19.0-312.0.dev)
• DevTools version 2.18.0
[!] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] VS Code (version 1.62.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.21.0
[✓] Connected device (5 available)
• SM G975F (mobile) • RZ8M802WY0X • android-arm64 • Android 11 (API 30)
• Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 •
ios • iOS 14.4.1 18D61
• iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729 •
ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• macOS (desktop) • macos •
darwin-x64 • Mac OS X 10.15.4 19E2269 darwin-x64
• Chrome (web) • chrome •
web-javascript • Google Chrome 98.0.4758.80
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
Thread 0 MAIN THREAD_CastError: type 'BorderRadiusDirectional' is not a subtype of type 'BorderRadius' in type cast
at StadiumBorder.lerpFrom (stadium_border.dart:51)
at ShapeBorder.lerp (borders.dart:523)
at ShapeBorderTween.lerp (material.dart:745)
at Tween.transform (tween.dart:356)
at Animatable.evaluate (tween.dart:68)
at _MaterialInteriorState.build (material.dart:861
The code in stadium_border.dart is:if (a isRoundedRectangleBorder) {
return_StadiumToRoundedRectangleBorder(
side:BorderSide.lerp(a.side, side, t),
borderRadius: a.borderRadius asBorderRadius,
rectness:1.0- t,
);
}
RoundedRectangleBorder.borderRadius has type BorderRadiusGeometype, and not necessarily BorderRadius.
The code probably shouldn't cast to BorderRadius without checking.
Activity
zoechi commentedon Jan 12, 2019
Looks similar to #24257
BenWildeman commentedon Jan 12, 2019
it is, I'm creating a PR to fix it
markusaksli-nc commentedon Jul 28, 2020
Still not supported on latest master
1.21.0-6.0.pre.41.flutter doctor -v
darshankawar commentedon Oct 20, 2022
This is still the case on latest stable and master versions:
stable, master flutter doctor -v
ChristianEdwardPadilla commentedon Oct 30, 2022
Similar issue causing crashes in pay client:
Thread 0 MAIN THREAD_CastError: type 'BorderRadiusDirectional' is not a subtype of type 'BorderRadius' in type cast
at StadiumBorder.lerpFrom (stadium_border.dart:51)
at ShapeBorder.lerp (borders.dart:523)
at ShapeBorderTween.lerp (material.dart:745)
at Tween.transform (tween.dart:356)
at Animatable.evaluate (tween.dart:68)
at _MaterialInteriorState.build (material.dart:861
RoundedRectangleBorder.borderRadius has type BorderRadiusGeometype, and not necessarily BorderRadius.
The code probably shouldn't cast to BorderRadius without checking.