Repository navigation
Expected a value of type 'BorderRadius?', but got one of type 'BorderRadiusDirectional' #88039
Copy link
Copy link
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the consolefound in release: 2.2Found to occur in 2.2Found to occur in 2.2found in release: 2.5Found to occur in 2.5Found to occur in 2.5frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to Reproduce
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Directionality(
textDirection: TextDirection.rtl,
child: Scaffold(
body: Center(
child: Container(
height: 80,
width: 80,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
border: Border.all(width: 3, color: Colors.black),
borderRadius: BorderRadiusDirectional.horizontal(
start: Radius.circular(35),
),
),
child: Text('hello'),
),
),
),
),
),
);
}Expected results:
Actual results:
The following TypeErrorImpl was thrown during paint():
Expected a value of type 'BorderRadius?', but got one of type 'BorderRadiusDirectional'I think the culprit is this line https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/painting/box_decoration.dart#L488
and
since it should be of type BorderRadiusGeometry
Logs
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1110], locale en-US)
• Flutter version 2.2.3 at C:\tools\flutter
• Framework revision f4abaa0735 (6 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME =
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the consolefound in release: 2.2Found to occur in 2.2Found to occur in 2.2found in release: 2.5Found to occur in 2.5Found to occur in 2.5frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version

Activity
maheshj01 commentedon Aug 12, 2021
reproducible on the latest
stable 2.2.3and themaster 2.5.0-6.0.pre.21Looks similar to #26468
flutter doctor -v
Originally filed here #24257
github-actions commentedon Sep 15, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.