Skip to content

BorderRadiusDirectional not supported in BorderRadiusTween #26468

Open

Description

@BenWildeman
No description provided.

Activity

  1. zoechi commented on Jan 12, 2019

    @zoechi
    Contributor

    Looks similar to #24257

  2. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Jan 12, 2019
  3. added this to the milestone on Jan 12, 2019
  4. BenWildeman commented on Jan 12, 2019

    @BenWildeman
    Author

    it is, I'm creating a PR to fix it

  5. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  6. markusaksli-nc commented on Jul 28, 2020

    @markusaksli-nc
    Contributor

    Still not supported on latest master 1.21.0-6.0.pre.41.

    import 'package:flutter/material.dart';
    void main() {  BorderRadiusTween(begin: BorderRadiusDirectional.all(Radius.zero), end: BorderRadiusDirectional.all(Radius.elliptical(1, 4)));}
    
    flutter doctor -v
    [√] Flutter (Channel master, 1.21.0-6.0.pre.41, on Microsoft Windows [Version 10.0.18362.959], locale et-EE)
       • Flutter version 1.21.0-6.0.pre.41 at C:\Development\flutter_master
       • Framework revision 39fa00201d (5 hours ago), 2020-07-27 21:11:43 -0700
       • Engine revision f27729e97b
       • Dart version 2.10.0 (build 2.10.0-0.0.dev 24c7666def)
    
    
    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
       • Android SDK at C:\Users\Isa\AppData\Local\Android\sdk
       • Platform android-30, build-tools 30.0.0
       • Java binary at: C:\Users\Isa\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763\jre\bin\java
       • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
       • All Android licenses accepted.
    
    [√] Chrome - develop for the web
       • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.6.4)
       • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
       • Visual Studio Community 2019 version 16.6.30309.148
       • Windows 10 SDK version 10.0.18362.0
    
    [√] Android Studio (version 4.0)
       • Android Studio at C:\Users\Isa\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6626763
       • Flutter plugin version 47.1.2
       • Dart plugin version 193.7361
       • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    
    [√] VS Code (version 1.47.2)
       • VS Code at C:\Users\Isa\AppData\Local\Programs\Microsoft VS Code
       • Flutter extension version 3.12.2
    
    [√] Connected device (5 available)
       • SM G950F (mobile)       • ce12171c51cc001c03 • android-arm64  • Android 9 (API 28)
       • sdk gphone x86 (mobile) • emulator-5554      • android-x86    • Android 11 (API 30) (emulator)
       • Windows (desktop)       • windows            • windows-x64    • Microsoft Windows [Version 10.0.18362.959]
       • Web Server (web)        • web-server         • web-javascript • Flutter Tools
       • Chrome (web)            • chrome             • web-javascript • Google Chrome 84.0.4147.89
    
    • No issues found!
    
  7. removed this from the milestone on Aug 17, 2020
  8. darshankawar commented on Oct 20, 2022

    @darshankawar
    Member

    This is still the case on latest stable and master versions:

    Screenshot 2022-10-20 at 4 33 32 PM

    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.
    
    
    
    
  9. ChristianEdwardPadilla commented on Oct 30, 2022

    @ChristianEdwardPadilla

    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

    The code in stadium_border.dart is:
      if (a is RoundedRectangleBorder) {
          return _StadiumToRoundedRectangleBorder(
            side: BorderSide.lerp(a.side, side, t),
            borderRadius: a.borderRadius as BorderRadius,
            rectness: 1.0 - t,
          );
        }

    RoundedRectangleBorder.borderRadius has type BorderRadiusGeometype, and not necessarily BorderRadius.
    The code probably shouldn't cast to BorderRadius without checking.

  10. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: animationAnimation APIscustomer: money (g3)found in release: 3.5Found to occur in 3.5has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions