Unverified Commit fd12db07 authored by Denis Grafov's avatar Denis Grafov Committed by GitHub

Replace all BorderRadius.circular with const BorderRadius.all (#91239)

parent f25b833f
...@@ -1157,7 +1157,7 @@ class _ContextMenuSheet extends StatelessWidget { ...@@ -1157,7 +1157,7 @@ class _ContextMenuSheet extends StatelessWidget {
flex: 2, flex: 2,
child: IntrinsicHeight( child: IntrinsicHeight(
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(13.0), borderRadius: const BorderRadius.all(Radius.circular(13.0)),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: actions, children: actions,
......
...@@ -458,7 +458,7 @@ class CupertinoPopupSurface extends StatelessWidget { ...@@ -458,7 +458,7 @@ class CupertinoPopupSurface extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ClipRRect( return ClipRRect(
borderRadius: BorderRadius.circular(_kCornerRadius), borderRadius: const BorderRadius.all(Radius.circular(_kCornerRadius)),
child: BackdropFilter( child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: _kBlurAmount, sigmaY: _kBlurAmount), filter: ImageFilter.blur(sigmaX: _kBlurAmount, sigmaY: _kBlurAmount),
child: Container( child: Container(
...@@ -686,7 +686,7 @@ class CupertinoActionSheet extends StatelessWidget { ...@@ -686,7 +686,7 @@ class CupertinoActionSheet extends StatelessWidget {
final List<Widget> children = <Widget>[ final List<Widget> children = <Widget>[
Flexible(child: ClipRRect( Flexible(child: ClipRRect(
borderRadius: BorderRadius.circular(12.0), borderRadius: const BorderRadius.all(Radius.circular(12.0)),
child: BackdropFilter( child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: _kBlurAmount, sigmaY: _kBlurAmount), filter: ImageFilter.blur(sigmaX: _kBlurAmount, sigmaY: _kBlurAmount),
child: _CupertinoDialogRenderWidget( child: _CupertinoDialogRenderWidget(
...@@ -858,7 +858,7 @@ class _CupertinoActionSheetCancelButtonState extends State<_CupertinoActionSheet ...@@ -858,7 +858,7 @@ class _CupertinoActionSheetCancelButtonState extends State<_CupertinoActionSheet
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: CupertinoDynamicColor.resolve(backgroundColor, context), color: CupertinoDynamicColor.resolve(backgroundColor, context),
borderRadius: BorderRadius.circular(_kCornerRadius), borderRadius: const BorderRadius.all(Radius.circular(_kCornerRadius)),
), ),
child: widget.child, child: widget.child,
), ),
......
...@@ -576,7 +576,7 @@ class _NavigationIndicator extends StatelessWidget { ...@@ -576,7 +576,7 @@ class _NavigationIndicator extends StatelessWidget {
width: 64.0, width: 64.0,
height: 32.0, height: 32.0,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.0), borderRadius: const BorderRadius.all(Radius.circular(16.0)),
color: color ?? colorScheme.secondary.withOpacity(.24), color: color ?? colorScheme.secondary.withOpacity(.24),
), ),
), ),
......
...@@ -528,7 +528,7 @@ class _SnackBarState extends State<SnackBar> { ...@@ -528,7 +528,7 @@ class _SnackBarState extends State<SnackBar> {
final Color backgroundColor = widget.backgroundColor ?? snackBarTheme.backgroundColor ?? inverseTheme.colorScheme.background; final Color backgroundColor = widget.backgroundColor ?? snackBarTheme.backgroundColor ?? inverseTheme.colorScheme.background;
final ShapeBorder? shape = widget.shape final ShapeBorder? shape = widget.shape
?? snackBarTheme.shape ?? snackBarTheme.shape
?? (isFloatingSnackBar ? RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0)) : null); ?? (isFloatingSnackBar ? const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))) : null);
snackBar = Material( snackBar = Material(
shape: shape, shape: shape,
......
...@@ -28,7 +28,7 @@ void main() { ...@@ -28,7 +28,7 @@ void main() {
expect( expect(
decoration.borderRadius, decoration.borderRadius,
BorderRadius.circular(9), const BorderRadius.all(Radius.circular(9)),
); );
}, },
); );
......
...@@ -500,7 +500,7 @@ void main() { ...@@ -500,7 +500,7 @@ void main() {
expect( expect(
decoration.borderRadius, decoration.borderRadius,
BorderRadius.circular(5), const BorderRadius.all(Radius.circular(5)),
); );
expect( expect(
decoration.border!.bottom.color.value, decoration.border!.bottom.color.value,
...@@ -526,7 +526,7 @@ void main() { ...@@ -526,7 +526,7 @@ void main() {
expect( expect(
decoration.borderRadius, decoration.borderRadius,
BorderRadius.circular(5), const BorderRadius.all(Radius.circular(5)),
); );
expect( expect(
decoration.border!.bottom.color.value, decoration.border!.bottom.color.value,
......
...@@ -57,14 +57,14 @@ void main() { ...@@ -57,14 +57,14 @@ void main() {
onPressed: () { }, onPressed: () { },
), ),
floatingActionButtonLocation: location, floatingActionButtonLocation: location,
bottomNavigationBar: BottomAppBar( bottomNavigationBar: const BottomAppBar(
shape: AutomaticNotchedShape( shape: AutomaticNotchedShape(
BeveledRectangleBorder(borderRadius: BorderRadius.circular(50.0)), BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(50.0))),
ContinuousRectangleBorder(borderRadius: BorderRadius.circular(30.0)), ContinuousRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(30.0))),
), ),
notchMargin: 10.0, notchMargin: 10.0,
color: Colors.green, color: Colors.green,
child: const SizedBox(height: 100.0), child: SizedBox(height: 100.0),
), ),
), ),
), ),
......
...@@ -527,7 +527,7 @@ void main() { ...@@ -527,7 +527,7 @@ void main() {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
const Color color = Colors.pink; const Color color = Colors.pink;
const double elevation = 9.0; const double elevation = 9.0;
final ShapeBorder shape = BeveledRectangleBorder(borderRadius: BorderRadius.circular(12)); const ShapeBorder shape = BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12)));
const Clip clipBehavior = Clip.antiAlias; const Clip clipBehavior = Clip.antiAlias;
const Color barrierColor = Colors.red; const Color barrierColor = Colors.red;
......
...@@ -35,12 +35,12 @@ void main() { ...@@ -35,12 +35,12 @@ void main() {
testWidgets('BottomSheetThemeData implements debugFillProperties', (WidgetTester tester) async { testWidgets('BottomSheetThemeData implements debugFillProperties', (WidgetTester tester) async {
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
BottomSheetThemeData( const BottomSheetThemeData(
backgroundColor: const Color(0xFFFFFFFF), backgroundColor: Color(0xFFFFFFFF),
elevation: 2.0, elevation: 2.0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))),
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
constraints: const BoxConstraints(minWidth: 200, maxWidth: 640), constraints: BoxConstraints(minWidth: 200, maxWidth: 640),
).debugFillProperties(builder); ).debugFillProperties(builder);
final List<String> description = builder.properties final List<String> description = builder.properties
...@@ -329,10 +329,10 @@ Widget bottomSheetWithElevations(BottomSheetThemeData bottomSheetTheme) { ...@@ -329,10 +329,10 @@ Widget bottomSheetWithElevations(BottomSheetThemeData bottomSheetTheme) {
} }
BottomSheetThemeData _bottomSheetTheme() { BottomSheetThemeData _bottomSheetTheme() {
return BottomSheetThemeData( return const BottomSheetThemeData(
backgroundColor: Colors.orange, backgroundColor: Colors.orange,
elevation: 12.0, elevation: 12.0,
shape: BeveledRectangleBorder(borderRadius: BorderRadius.circular(12)), shape: BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))),
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
); );
} }
...@@ -890,8 +890,8 @@ void main() { ...@@ -890,8 +890,8 @@ void main() {
}); });
testWidgets('Checkbox respects shape and side', (WidgetTester tester) async { testWidgets('Checkbox respects shape and side', (WidgetTester tester) async {
final RoundedRectangleBorder roundedRectangleBorder = const RoundedRectangleBorder roundedRectangleBorder =
RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)); RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(5)));
const BorderSide side = BorderSide( const BorderSide side = BorderSide(
width: 4, width: 4,
......
...@@ -26,11 +26,11 @@ void main() { ...@@ -26,11 +26,11 @@ void main() {
testWidgets('Custom debugFillProperties', (WidgetTester tester) async { testWidgets('Custom debugFillProperties', (WidgetTester tester) async {
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
DrawerThemeData( const DrawerThemeData(
backgroundColor: const Color(0x00000099), backgroundColor: Color(0x00000099),
scrimColor: const Color(0x00000098), scrimColor: Color(0x00000098),
elevation: 5.0, elevation: 5.0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))),
).debugFillProperties(builder); ).debugFillProperties(builder);
final List<String> description = builder.properties final List<String> description = builder.properties
......
...@@ -41,7 +41,7 @@ void main() { ...@@ -41,7 +41,7 @@ void main() {
expect(material.color, colorScheme.primary); expect(material.color, colorScheme.primary);
expect(material.elevation, 2); expect(material.elevation, 2);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))));
expect(material.textStyle!.color, colorScheme.onPrimary); expect(material.textStyle!.color, colorScheme.onPrimary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -67,7 +67,7 @@ void main() { ...@@ -67,7 +67,7 @@ void main() {
expect(material.color, colorScheme.primary); expect(material.color, colorScheme.primary);
expect(material.elevation, 8); expect(material.elevation, 8);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))));
expect(material.textStyle!.color, colorScheme.onPrimary); expect(material.textStyle!.color, colorScheme.onPrimary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -106,7 +106,7 @@ void main() { ...@@ -106,7 +106,7 @@ void main() {
expect(material.color, colorScheme.primary); expect(material.color, colorScheme.primary);
expect(material.elevation, 2); expect(material.elevation, 2);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))));
expect(material.textStyle!.color, colorScheme.onPrimary); expect(material.textStyle!.color, colorScheme.onPrimary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -137,7 +137,7 @@ void main() { ...@@ -137,7 +137,7 @@ void main() {
expect(material.color, colorScheme.onSurface.withOpacity(0.12)); expect(material.color, colorScheme.onSurface.withOpacity(0.12));
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))));
expect(material.textStyle!.color, colorScheme.onSurface.withOpacity(0.38)); expect(material.textStyle!.color, colorScheme.onSurface.withOpacity(0.38));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -1203,9 +1203,9 @@ void main() { ...@@ -1203,9 +1203,9 @@ void main() {
home: Center( home: Center(
child: ElevatedButton( child: ElevatedButton(
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder( shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.all(Radius.circular(16)),
side: const BorderSide(width: 4, color: borderColor), side: BorderSide(width: 4, color: borderColor),
), ),
), ),
onPressed: () { }, onPressed: () { },
......
...@@ -33,7 +33,7 @@ void main() { ...@@ -33,7 +33,7 @@ void main() {
expect(material.color, colorScheme.primary); expect(material.color, colorScheme.primary);
expect(material.elevation, 2); expect(material.elevation, 2);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
expect(material.textStyle!.color, colorScheme.onPrimary); expect(material.textStyle!.color, colorScheme.onPrimary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
......
...@@ -35,7 +35,7 @@ void main() { ...@@ -35,7 +35,7 @@ void main() {
expect(material.color, null); expect(material.color, null);
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, null); expect(material.shadowColor, null);
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))));
expect(material.textStyle!.color, const Color(0xdd000000)); expect(material.textStyle!.color, const Color(0xdd000000));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -55,7 +55,7 @@ void main() { ...@@ -55,7 +55,7 @@ void main() {
expect(material.color, null); expect(material.color, null);
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, null); expect(material.shadowColor, null);
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))));
expect(material.textStyle!.color, const Color(0xdd000000)); expect(material.textStyle!.color, const Color(0xdd000000));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -80,7 +80,7 @@ void main() { ...@@ -80,7 +80,7 @@ void main() {
expect(material.color, null); expect(material.color, null);
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, null); expect(material.shadowColor, null);
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))));
expect(material.textStyle!.color, const Color(0x61000000)); expect(material.textStyle!.color, const Color(0x61000000));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
......
...@@ -38,7 +38,7 @@ void main() { ...@@ -38,7 +38,7 @@ void main() {
testWidgets('The InkWell widget renders an ink splash', (WidgetTester tester) async { testWidgets('The InkWell widget renders an ink splash', (WidgetTester tester) async {
const Color highlightColor = Color(0xAAFF0000); const Color highlightColor = Color(0xAAFF0000);
const Color splashColor = Color(0xAA0000FF); const Color splashColor = Color(0xAA0000FF);
final BorderRadius borderRadius = BorderRadius.circular(6.0); const BorderRadius borderRadius = BorderRadius.all(Radius.circular(6.0));
await tester.pumpWidget( await tester.pumpWidget(
Directionality( Directionality(
...@@ -87,7 +87,7 @@ void main() { ...@@ -87,7 +87,7 @@ void main() {
testWidgets('The InkWell widget renders an ink ripple', (WidgetTester tester) async { testWidgets('The InkWell widget renders an ink ripple', (WidgetTester tester) async {
const Color highlightColor = Color(0xAAFF0000); const Color highlightColor = Color(0xAAFF0000);
const Color splashColor = Color(0xB40000FF); const Color splashColor = Color(0xB40000FF);
final BorderRadius borderRadius = BorderRadius.circular(6.0); const BorderRadius borderRadius = BorderRadius.all(Radius.circular(6.0));
await tester.pumpWidget( await tester.pumpWidget(
Directionality( Directionality(
...@@ -254,7 +254,7 @@ void main() { ...@@ -254,7 +254,7 @@ void main() {
testWidgets('The InkWell widget renders an SelectAction or ActivateAction-induced ink ripple', (WidgetTester tester) async { testWidgets('The InkWell widget renders an SelectAction or ActivateAction-induced ink ripple', (WidgetTester tester) async {
const Color highlightColor = Color(0xAAFF0000); const Color highlightColor = Color(0xAAFF0000);
const Color splashColor = Color(0xB40000FF); const Color splashColor = Color(0xB40000FF);
final BorderRadius borderRadius = BorderRadius.circular(6.0); const BorderRadius borderRadius = BorderRadius.all(Radius.circular(6.0));
final FocusNode focusNode = FocusNode(debugLabel: 'Test Node'); final FocusNode focusNode = FocusNode(debugLabel: 'Test Node');
Future<void> buildTest(Intent intent) async { Future<void> buildTest(Intent intent) async {
......
...@@ -871,9 +871,9 @@ void main() { ...@@ -871,9 +871,9 @@ void main() {
labelText: 'label', labelText: 'label',
alignLabelWithHint: alignLabelWithHint, alignLabelWithHint: alignLabelWithHint,
hintText: 'hint', hintText: 'hint',
border: OutlineInputBorder( border: const OutlineInputBorder(
borderSide: const BorderSide(width: 1, color: Colors.black, style: BorderStyle.solid), borderSide: BorderSide(width: 1, color: Colors.black, style: BorderStyle.solid),
borderRadius: BorderRadius.circular(0), borderRadius: BorderRadius.zero,
), ),
), ),
), ),
...@@ -3775,11 +3775,11 @@ void main() { ...@@ -3775,11 +3775,11 @@ void main() {
buildInputDecorator( buildInputDecorator(
// isEmpty: false (default) // isEmpty: false (default)
// isFocused: false (default) // isFocused: false (default)
decoration: InputDecoration( decoration: const InputDecoration(
filled: true, filled: true,
fillColor: const Color(0xFF00FF00), fillColor: Color(0xFF00FF00),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.all(Radius.circular(12.0)),
), ),
), ),
), ),
......
...@@ -39,7 +39,7 @@ void main() { ...@@ -39,7 +39,7 @@ void main() {
expect(material.color, null); expect(material.color, null);
expect(material.elevation, 2.0); expect(material.elevation, 2.0);
expect(material.shadowColor, null); expect(material.shadowColor, null);
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))));
expect(material.textStyle!.color, const Color(0xdd000000)); expect(material.textStyle!.color, const Color(0xdd000000));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -59,7 +59,7 @@ void main() { ...@@ -59,7 +59,7 @@ void main() {
expect(material.color, null); expect(material.color, null);
expect(material.elevation, 8.0); expect(material.elevation, 8.0);
expect(material.shadowColor, null); expect(material.shadowColor, null);
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))));
expect(material.textStyle!.color, const Color(0xdd000000)); expect(material.textStyle!.color, const Color(0xdd000000));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -84,7 +84,7 @@ void main() { ...@@ -84,7 +84,7 @@ void main() {
expect(material.color, null); expect(material.color, null);
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, null); expect(material.shadowColor, null);
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))));
expect(material.textStyle!.color, const Color(0x61000000)); expect(material.textStyle!.color, const Color(0x61000000));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
......
...@@ -797,9 +797,9 @@ void main() { ...@@ -797,9 +797,9 @@ void main() {
child: Material( child: Material(
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
elevation: 0, elevation: 0,
shape: RoundedRectangleBorder( shape: const RoundedRectangleBorder(
side: const BorderSide(color: Colors.grey, width: 6), side: BorderSide(color: Colors.grey, width: 6),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.all(Radius.circular(8)),
), ),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
...@@ -836,9 +836,9 @@ void main() { ...@@ -836,9 +836,9 @@ void main() {
child: Material( child: Material(
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
elevation: 0, elevation: 0,
shape: RoundedRectangleBorder( shape: const RoundedRectangleBorder(
side: const BorderSide(color: Colors.grey, width: 6), side: BorderSide(color: Colors.grey, width: 6),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.all(Radius.circular(8)),
), ),
borderOnForeground: false, borderOnForeground: false,
child: Column( child: Column(
......
...@@ -44,7 +44,7 @@ void main() { ...@@ -44,7 +44,7 @@ void main() {
expect(material.shape, isInstanceOf<RoundedRectangleBorder>()); expect(material.shape, isInstanceOf<RoundedRectangleBorder>());
RoundedRectangleBorder materialShape = material.shape! as RoundedRectangleBorder; RoundedRectangleBorder materialShape = material.shape! as RoundedRectangleBorder;
expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12))); expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12)));
expect(materialShape.borderRadius, BorderRadius.circular(4.0)); expect(materialShape.borderRadius, const BorderRadius.all(Radius.circular(4.0)));
expect(material.textStyle!.color, colorScheme.primary); expect(material.textStyle!.color, colorScheme.primary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
...@@ -77,7 +77,7 @@ void main() { ...@@ -77,7 +77,7 @@ void main() {
expect(material.shape, isInstanceOf<RoundedRectangleBorder>()); expect(material.shape, isInstanceOf<RoundedRectangleBorder>());
materialShape = material.shape! as RoundedRectangleBorder; materialShape = material.shape! as RoundedRectangleBorder;
expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12))); expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12)));
expect(materialShape.borderRadius, BorderRadius.circular(4.0)); expect(materialShape.borderRadius, const BorderRadius.all(Radius.circular(4.0)));
expect(material.textStyle!.color, colorScheme.primary); expect(material.textStyle!.color, colorScheme.primary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
...@@ -118,7 +118,7 @@ void main() { ...@@ -118,7 +118,7 @@ void main() {
expect(material.shape, isInstanceOf<RoundedRectangleBorder>()); expect(material.shape, isInstanceOf<RoundedRectangleBorder>());
materialShape = material.shape! as RoundedRectangleBorder; materialShape = material.shape! as RoundedRectangleBorder;
expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12))); expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12)));
expect(materialShape.borderRadius, BorderRadius.circular(4.0)); expect(materialShape.borderRadius, const BorderRadius.all(Radius.circular(4.0)));
expect(material.textStyle!.color, colorScheme.primary); expect(material.textStyle!.color, colorScheme.primary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
...@@ -151,7 +151,7 @@ void main() { ...@@ -151,7 +151,7 @@ void main() {
expect(material.shape, isInstanceOf<RoundedRectangleBorder>()); expect(material.shape, isInstanceOf<RoundedRectangleBorder>());
materialShape = material.shape! as RoundedRectangleBorder; materialShape = material.shape! as RoundedRectangleBorder;
expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12))); expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12)));
expect(materialShape.borderRadius, BorderRadius.circular(4.0)); expect(materialShape.borderRadius, const BorderRadius.all(Radius.circular(4.0)));
expect(material.textStyle!.color, colorScheme.onSurface.withOpacity(0.38)); expect(material.textStyle!.color, colorScheme.onSurface.withOpacity(0.38));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
......
...@@ -37,7 +37,7 @@ void main() { ...@@ -37,7 +37,7 @@ void main() {
expect(material.shape, isInstanceOf<RoundedRectangleBorder>()); expect(material.shape, isInstanceOf<RoundedRectangleBorder>());
final RoundedRectangleBorder materialShape = material.shape! as RoundedRectangleBorder; final RoundedRectangleBorder materialShape = material.shape! as RoundedRectangleBorder;
expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12))); expect(materialShape.side, BorderSide(width: 1, color: colorScheme.onSurface.withOpacity(0.12)));
expect(materialShape.borderRadius, BorderRadius.circular(4.0)); expect(materialShape.borderRadius, const BorderRadius.all(Radius.circular(4.0)));
expect(material.textStyle!.color, colorScheme.primary); expect(material.textStyle!.color, colorScheme.primary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
......
...@@ -505,7 +505,7 @@ void main() { ...@@ -505,7 +505,7 @@ void main() {
final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> scaffoldKey = GlobalKey<ScaffoldState>();
const Color color = Colors.pink; const Color color = Colors.pink;
const double elevation = 9.0; const double elevation = 9.0;
final ShapeBorder shape = BeveledRectangleBorder(borderRadius: BorderRadius.circular(12)); const ShapeBorder shape = BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12)));
const Clip clipBehavior = Clip.antiAlias; const Clip clipBehavior = Clip.antiAlias;
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
......
...@@ -7,11 +7,11 @@ import 'package:flutter/rendering.dart'; ...@@ -7,11 +7,11 @@ import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
PopupMenuThemeData _popupMenuTheme() { PopupMenuThemeData _popupMenuTheme() {
return PopupMenuThemeData( return const PopupMenuThemeData(
color: Colors.orange, color: Colors.orange,
shape: BeveledRectangleBorder(borderRadius: BorderRadius.circular(12)), shape: BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))),
elevation: 12.0, elevation: 12.0,
textStyle: const TextStyle(color: Color(0xffffffff), textBaseline: TextBaseline.alphabetic), textStyle: TextStyle(color: Color(0xffffffff), textBaseline: TextBaseline.alphabetic),
); );
} }
...@@ -43,11 +43,11 @@ void main() { ...@@ -43,11 +43,11 @@ void main() {
testWidgets('PopupMenuThemeData implements debugFillProperties', (WidgetTester tester) async { testWidgets('PopupMenuThemeData implements debugFillProperties', (WidgetTester tester) async {
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
PopupMenuThemeData( const PopupMenuThemeData(
color: const Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))),
elevation: 2.0, elevation: 2.0,
textStyle: const TextStyle(color: Color(0xffffffff)), textStyle: TextStyle(color: Color(0xffffffff)),
).debugFillProperties(builder); ).debugFillProperties(builder);
final List<String> description = builder.properties final List<String> description = builder.properties
...@@ -259,11 +259,11 @@ void main() { ...@@ -259,11 +259,11 @@ void main() {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
PopupMenuTheme( PopupMenuTheme(
data: PopupMenuThemeData( data: const PopupMenuThemeData(
color: Colors.pink, color: Colors.pink,
shape: BeveledRectangleBorder(borderRadius: BorderRadius.circular(10)), shape: BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))),
elevation: 6.0, elevation: 6.0,
textStyle: const TextStyle(color: Color(0xfffff000), textBaseline: TextBaseline.alphabetic), textStyle: TextStyle(color: Color(0xfffff000), textBaseline: TextBaseline.alphabetic),
), ),
child: PopupMenuButton<void>( child: PopupMenuButton<void>(
key: popupButtonKey, key: popupButtonKey,
...@@ -296,7 +296,7 @@ void main() { ...@@ -296,7 +296,7 @@ void main() {
).last, ).last,
); );
expect(button.color, Colors.pink); expect(button.color, Colors.pink);
expect(button.shape, BeveledRectangleBorder(borderRadius: BorderRadius.circular(10))); expect(button.shape, const BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))));
expect(button.elevation, 6.0); expect(button.elevation, 6.0);
/// The last DefaultTextStyle widget under popupItemKey is the /// The last DefaultTextStyle widget under popupItemKey is the
......
...@@ -35,7 +35,7 @@ void main() { ...@@ -35,7 +35,7 @@ void main() {
expect(material.color, const Color(0xffe0e0e0)); expect(material.color, const Color(0xffe0e0e0));
expect(material.elevation, 2.0); expect(material.elevation, 2.0);
expect(material.shadowColor, null); expect(material.shadowColor, null);
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))));
expect(material.textStyle!.color, const Color(0xdd000000)); expect(material.textStyle!.color, const Color(0xdd000000));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -55,7 +55,7 @@ void main() { ...@@ -55,7 +55,7 @@ void main() {
expect(material.color, const Color(0xffe0e0e0)); expect(material.color, const Color(0xffe0e0e0));
expect(material.elevation, 8.0); expect(material.elevation, 8.0);
expect(material.shadowColor, null); expect(material.shadowColor, null);
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))));
expect(material.textStyle!.color, const Color(0xdd000000)); expect(material.textStyle!.color, const Color(0xdd000000));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -80,7 +80,7 @@ void main() { ...@@ -80,7 +80,7 @@ void main() {
expect(material.color, const Color(0x61000000)); expect(material.color, const Color(0x61000000));
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, null); expect(material.shadowColor, null);
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))));
expect(material.textStyle!.color, const Color(0x61000000)); expect(material.textStyle!.color, const Color(0x61000000));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
......
...@@ -37,13 +37,13 @@ void main() { ...@@ -37,13 +37,13 @@ void main() {
testWidgets('SnackBarThemeData implements debugFillProperties', (WidgetTester tester) async { testWidgets('SnackBarThemeData implements debugFillProperties', (WidgetTester tester) async {
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder(); final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
SnackBarThemeData( const SnackBarThemeData(
backgroundColor: const Color(0xFFFFFFFF), backgroundColor: Color(0xFFFFFFFF),
actionTextColor: const Color(0xFF0000AA), actionTextColor: Color(0xFF0000AA),
disabledActionTextColor: const Color(0xFF00AA00), disabledActionTextColor: Color(0xFF00AA00),
contentTextStyle: const TextStyle(color: Color(0xFF123456)), contentTextStyle: TextStyle(color: Color(0xFF123456)),
elevation: 2.0, elevation: 2.0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(2.0)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))),
behavior: SnackBarBehavior.floating, behavior: SnackBarBehavior.floating,
).debugFillProperties(builder); ).debugFillProperties(builder);
...@@ -365,12 +365,12 @@ void main() { ...@@ -365,12 +365,12 @@ void main() {
} }
SnackBarThemeData _snackBarTheme() { SnackBarThemeData _snackBarTheme() {
return SnackBarThemeData( return const SnackBarThemeData(
backgroundColor: Colors.orange, backgroundColor: Colors.orange,
actionTextColor: Colors.green, actionTextColor: Colors.green,
contentTextStyle: const TextStyle(color: Colors.blue), contentTextStyle: TextStyle(color: Colors.blue),
elevation: 12.0, elevation: 12.0,
shape: BeveledRectangleBorder(borderRadius: BorderRadius.circular(12)), shape: BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))),
); );
} }
......
...@@ -304,9 +304,9 @@ void main() { ...@@ -304,9 +304,9 @@ void main() {
}); });
testWidgets('Tab bar theme - beveled rect indicator', (WidgetTester tester) async { testWidgets('Tab bar theme - beveled rect indicator', (WidgetTester tester) async {
final TabBarTheme tabBarTheme = TabBarTheme( const TabBarTheme tabBarTheme = TabBarTheme(
indicator: ShapeDecoration( indicator: ShapeDecoration(
shape: BeveledRectangleBorder(borderRadius: BorderRadius.circular(20.0)), shape: BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20.0))),
color: Colors.black, color: Colors.black,
), ),
); );
......
...@@ -40,7 +40,7 @@ void main() { ...@@ -40,7 +40,7 @@ void main() {
expect(material.color, Colors.transparent); expect(material.color, Colors.transparent);
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
expect(material.textStyle!.color, colorScheme.primary); expect(material.textStyle!.color, colorScheme.primary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -68,7 +68,7 @@ void main() { ...@@ -68,7 +68,7 @@ void main() {
expect(material.color, Colors.transparent); expect(material.color, Colors.transparent);
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
expect(material.textStyle!.color, colorScheme.primary); expect(material.textStyle!.color, colorScheme.primary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -104,7 +104,7 @@ void main() { ...@@ -104,7 +104,7 @@ void main() {
expect(material.color, Colors.transparent); expect(material.color, Colors.transparent);
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
expect(material.textStyle!.color, colorScheme.primary); expect(material.textStyle!.color, colorScheme.primary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
...@@ -132,7 +132,7 @@ void main() { ...@@ -132,7 +132,7 @@ void main() {
expect(material.color, Colors.transparent); expect(material.color, Colors.transparent);
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
expect(material.textStyle!.color, colorScheme.onSurface.withOpacity(0.38)); expect(material.textStyle!.color, colorScheme.onSurface.withOpacity(0.38));
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
......
...@@ -33,7 +33,7 @@ void main() { ...@@ -33,7 +33,7 @@ void main() {
expect(material.color, Colors.transparent); expect(material.color, Colors.transparent);
expect(material.elevation, 0.0); expect(material.elevation, 0.0);
expect(material.shadowColor, const Color(0xff000000)); expect(material.shadowColor, const Color(0xff000000));
expect(material.shape, RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0))); expect(material.shape, const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0))));
expect(material.textStyle!.color, colorScheme.primary); expect(material.textStyle!.color, colorScheme.primary);
expect(material.textStyle!.fontFamily, 'Roboto'); expect(material.textStyle!.fontFamily, 'Roboto');
expect(material.textStyle!.fontSize, 14); expect(material.textStyle!.fontSize, 14);
......
...@@ -32,9 +32,9 @@ void main() { ...@@ -32,9 +32,9 @@ void main() {
}); });
test('BeveledRectangleBorder scale and lerp', () { test('BeveledRectangleBorder scale and lerp', () {
final BeveledRectangleBorder c10 = BeveledRectangleBorder(side: const BorderSide(width: 10.0), borderRadius: BorderRadius.circular(100.0)); const BeveledRectangleBorder c10 = BeveledRectangleBorder(side: BorderSide(width: 10.0), borderRadius: BorderRadius.all(Radius.circular(100.0)));
final BeveledRectangleBorder c15 = BeveledRectangleBorder(side: const BorderSide(width: 15.0), borderRadius: BorderRadius.circular(150.0)); const BeveledRectangleBorder c15 = BeveledRectangleBorder(side: BorderSide(width: 15.0), borderRadius: BorderRadius.all(Radius.circular(150.0)));
final BeveledRectangleBorder c20 = BeveledRectangleBorder(side: const BorderSide(width: 20.0), borderRadius: BorderRadius.circular(200.0)); const BeveledRectangleBorder c20 = BeveledRectangleBorder(side: BorderSide(width: 20.0), borderRadius: BorderRadius.all(Radius.circular(200.0)));
expect(c10.dimensions, const EdgeInsets.all(10.0)); expect(c10.dimensions, const EdgeInsets.all(10.0));
expect(c10.scale(2.0), c20); expect(c10.scale(2.0), c20);
expect(c20.scale(0.5), c10); expect(c20.scale(0.5), c10);
......
...@@ -37,9 +37,9 @@ void main() { ...@@ -37,9 +37,9 @@ void main() {
}); });
test('ContinuousRectangleBorder scale and lerp', () { test('ContinuousRectangleBorder scale and lerp', () {
final ContinuousRectangleBorder c10 = ContinuousRectangleBorder(side: const BorderSide(width: 10.0), borderRadius: BorderRadius.circular(100.0)); const ContinuousRectangleBorder c10 = ContinuousRectangleBorder(side: BorderSide(width: 10.0), borderRadius: BorderRadius.all(Radius.circular(100.0)));
final ContinuousRectangleBorder c15 = ContinuousRectangleBorder(side: const BorderSide(width: 15.0), borderRadius: BorderRadius.circular(150.0)); const ContinuousRectangleBorder c15 = ContinuousRectangleBorder(side: BorderSide(width: 15.0), borderRadius: BorderRadius.all(Radius.circular(150.0)));
final ContinuousRectangleBorder c20 = ContinuousRectangleBorder(side: const BorderSide(width: 20.0), borderRadius: BorderRadius.circular(200.0)); const ContinuousRectangleBorder c20 = ContinuousRectangleBorder(side: BorderSide(width: 20.0), borderRadius: BorderRadius.all(Radius.circular(200.0)));
expect(c10.dimensions, const EdgeInsets.all(10.0)); expect(c10.dimensions, const EdgeInsets.all(10.0));
expect(c10.scale(2.0), c20); expect(c10.scale(2.0), c20);
expect(c20.scale(0.5), c10); expect(c20.scale(0.5), c10);
...@@ -113,8 +113,8 @@ void main() { ...@@ -113,8 +113,8 @@ void main() {
await tester.pumpWidget(RepaintBoundary( await tester.pumpWidget(RepaintBoundary(
child: Material( child: Material(
color: Colors.blueAccent[400], color: Colors.blueAccent[400],
shape: ContinuousRectangleBorder( shape: const ContinuousRectangleBorder(
borderRadius: BorderRadius.circular(28.0), borderRadius: BorderRadius.all(Radius.circular(28.0)),
), ),
), ),
)); ));
...@@ -234,8 +234,8 @@ void main() { ...@@ -234,8 +234,8 @@ void main() {
await tester.pumpWidget(RepaintBoundary( await tester.pumpWidget(RepaintBoundary(
child: Material( child: Material(
color: Colors.redAccent[400], color: Colors.redAccent[400],
shape: ContinuousRectangleBorder( shape: const ContinuousRectangleBorder(
borderRadius: BorderRadius.circular(50.0), borderRadius: BorderRadius.all(Radius.circular(50.0)),
), ),
), ),
)); ));
......
...@@ -34,9 +34,9 @@ void main() { ...@@ -34,9 +34,9 @@ void main() {
}); });
test('RoundedRectangleBorder', () { test('RoundedRectangleBorder', () {
final RoundedRectangleBorder c10 = RoundedRectangleBorder(side: const BorderSide(width: 10.0), borderRadius: BorderRadius.circular(100.0)); const RoundedRectangleBorder c10 = RoundedRectangleBorder(side: BorderSide(width: 10.0), borderRadius: BorderRadius.all(Radius.circular(100.0)));
final RoundedRectangleBorder c15 = RoundedRectangleBorder(side: const BorderSide(width: 15.0), borderRadius: BorderRadius.circular(150.0)); const RoundedRectangleBorder c15 = RoundedRectangleBorder(side: BorderSide(width: 15.0), borderRadius: BorderRadius.all(Radius.circular(150.0)));
final RoundedRectangleBorder c20 = RoundedRectangleBorder(side: const BorderSide(width: 20.0), borderRadius: BorderRadius.circular(200.0)); const RoundedRectangleBorder c20 = RoundedRectangleBorder(side: BorderSide(width: 20.0), borderRadius: BorderRadius.all(Radius.circular(200.0)));
expect(c10.dimensions, const EdgeInsets.all(10.0)); expect(c10.dimensions, const EdgeInsets.all(10.0));
expect(c10.scale(2.0), c20); expect(c10.scale(2.0), c20);
expect(c20.scale(0.5), c10); expect(c20.scale(0.5), c10);
...@@ -44,8 +44,8 @@ void main() { ...@@ -44,8 +44,8 @@ void main() {
expect(ShapeBorder.lerp(c10, c20, 0.5), c15); expect(ShapeBorder.lerp(c10, c20, 0.5), c15);
expect(ShapeBorder.lerp(c10, c20, 1.0), c20); expect(ShapeBorder.lerp(c10, c20, 1.0), c20);
final RoundedRectangleBorder c1 = RoundedRectangleBorder(side: const BorderSide(width: 1.0), borderRadius: BorderRadius.circular(1.0)); const RoundedRectangleBorder c1 = RoundedRectangleBorder(side: BorderSide(width: 1.0), borderRadius: BorderRadius.all(Radius.circular(1.0)));
final RoundedRectangleBorder c2 = RoundedRectangleBorder(side: const BorderSide(width: 1.0), borderRadius: BorderRadius.circular(2.0)); const RoundedRectangleBorder c2 = RoundedRectangleBorder(side: BorderSide(width: 1.0), borderRadius: BorderRadius.all(Radius.circular(2.0)));
expect(c2.getInnerPath(Rect.fromCircle(center: Offset.zero, radius: 2.0)), isUnitCircle); expect(c2.getInnerPath(Rect.fromCircle(center: Offset.zero, radius: 2.0)), isUnitCircle);
expect(c1.getOuterPath(Rect.fromCircle(center: Offset.zero, radius: 1.0)), isUnitCircle); expect(c1.getOuterPath(Rect.fromCircle(center: Offset.zero, radius: 1.0)), isUnitCircle);
const Rect rect = Rect.fromLTRB(10.0, 20.0, 80.0, 190.0); const Rect rect = Rect.fromLTRB(10.0, 20.0, 80.0, 190.0);
...@@ -69,7 +69,7 @@ void main() { ...@@ -69,7 +69,7 @@ void main() {
}); });
test('RoundedRectangleBorder and CircleBorder', () { test('RoundedRectangleBorder and CircleBorder', () {
final RoundedRectangleBorder r = RoundedRectangleBorder(side: BorderSide.none, borderRadius: BorderRadius.circular(10.0)); const RoundedRectangleBorder r = RoundedRectangleBorder(side: BorderSide.none, borderRadius: BorderRadius.all(Radius.circular(10.0)));
const CircleBorder c = CircleBorder(side: BorderSide.none); const CircleBorder c = CircleBorder(side: BorderSide.none);
const Rect rect = Rect.fromLTWH(0.0, 0.0, 100.0, 20.0); // center is x=40..60 y=10 const Rect rect = Rect.fromLTWH(0.0, 0.0, 100.0, 20.0); // center is x=40..60 y=10
final Matcher looksLikeR = isPathThat( final Matcher looksLikeR = isPathThat(
......
...@@ -129,8 +129,8 @@ void main() { ...@@ -129,8 +129,8 @@ void main() {
}); });
test('TableBorder.all with a borderRadius', () { test('TableBorder.all with a borderRadius', () {
final TableBorder tableA = TableBorder.all(borderRadius: BorderRadius.circular(8.0)); final TableBorder tableA = TableBorder.all(borderRadius: const BorderRadius.all(Radius.circular(8.0)));
expect(tableA.borderRadius, BorderRadius.circular(8.0)); expect(tableA.borderRadius, const BorderRadius.all(Radius.circular(8.0)));
}); });
} }
...@@ -257,7 +257,7 @@ void main() { ...@@ -257,7 +257,7 @@ void main() {
test('Table paints a borderRadius', () { test('Table paints a borderRadius', () {
final RenderTable table = RenderTable( final RenderTable table = RenderTable(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
border: TableBorder.all(borderRadius: BorderRadius.circular(8.0)), border: TableBorder.all(borderRadius: const BorderRadius.all(Radius.circular(8.0))),
); );
layout(table); layout(table);
table.setFlatChildren(2, <RenderBox>[ table.setFlatChildren(2, <RenderBox>[
......
...@@ -354,7 +354,7 @@ Future<void> main() async { ...@@ -354,7 +354,7 @@ Future<void> main() async {
key: key, key: key,
width: 100.0, width: 100.0,
height: 50.0, height: 50.0,
decoration: BoxDecoration(border: border, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(20.0)), decoration: BoxDecoration(border: border, shape: BoxShape.rectangle, borderRadius: const BorderRadius.all(Radius.circular(20.0))),
), ),
onTap: () { onTap: () {
itemsTapped.add(1); itemsTapped.add(1);
......
...@@ -529,9 +529,9 @@ void main() { ...@@ -529,9 +529,9 @@ void main() {
child: Transform.rotate( child: Transform.rotate(
angle: 1.0, // radians angle: 1.0, // radians
child: ClipPath( child: ClipPath(
clipper: ShapeBorderClipper( clipper: const ShapeBorderClipper(
shape: BeveledRectangleBorder( shape: BeveledRectangleBorder(
borderRadius: BorderRadius.circular(20.0), borderRadius: BorderRadius.all(Radius.circular(20.0)),
), ),
), ),
child: Container( child: Container(
...@@ -576,7 +576,7 @@ void main() { ...@@ -576,7 +576,7 @@ void main() {
child: Transform.rotate( child: Transform.rotate(
angle: 1.0, // radians angle: 1.0, // radians
child: PhysicalModel( child: PhysicalModel(
borderRadius: BorderRadius.circular(20.0), borderRadius: const BorderRadius.all(Radius.circular(20.0)),
color: Colors.red, color: Colors.red,
clipBehavior: clipBehavior, clipBehavior: clipBehavior,
child: Container( child: Container(
...@@ -640,7 +640,7 @@ void main() { ...@@ -640,7 +640,7 @@ void main() {
child: Transform.rotate( child: Transform.rotate(
angle: 1.0, // radians angle: 1.0, // radians
child: PhysicalModel( child: PhysicalModel(
borderRadius: BorderRadius.circular(20.0), borderRadius: const BorderRadius.all(Radius.circular(20.0)),
color: Colors.red, color: Colors.red,
child: Container( child: Container(
color: Colors.white, color: Colors.white,
...@@ -681,9 +681,9 @@ void main() { ...@@ -681,9 +681,9 @@ void main() {
child: Transform.rotate( child: Transform.rotate(
angle: 1.0, // radians angle: 1.0, // radians
child: PhysicalShape( child: PhysicalShape(
clipper: ShapeBorderClipper( clipper: const ShapeBorderClipper(
shape: BeveledRectangleBorder( shape: BeveledRectangleBorder(
borderRadius: BorderRadius.circular(20.0), borderRadius: BorderRadius.all(Radius.circular(20.0)),
), ),
), ),
clipBehavior: clipBehavior, clipBehavior: clipBehavior,
...@@ -747,9 +747,9 @@ void main() { ...@@ -747,9 +747,9 @@ void main() {
child: Transform.rotate( child: Transform.rotate(
angle: 1.0, // radians angle: 1.0, // radians
child: PhysicalShape( child: PhysicalShape(
clipper: ShapeBorderClipper( clipper: const ShapeBorderClipper(
shape: BeveledRectangleBorder( shape: BeveledRectangleBorder(
borderRadius: BorderRadius.circular(20.0), borderRadius: BorderRadius.all(Radius.circular(20.0)),
), ),
), ),
color: Colors.red, color: Colors.red,
......
...@@ -520,8 +520,8 @@ void main() { ...@@ -520,8 +520,8 @@ void main() {
testWidgets('giving clipBehaviour Clip.None, will not add a ClipPath to the tree', (WidgetTester tester) async { testWidgets('giving clipBehaviour Clip.None, will not add a ClipPath to the tree', (WidgetTester tester) async {
await tester.pumpWidget(Container( await tester.pumpWidget(Container(
clipBehavior: Clip.none, clipBehavior: Clip.none,
decoration: BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.circular(1), borderRadius: BorderRadius.all(Radius.circular(1)),
), ),
child: const SizedBox(), child: const SizedBox(),
)); ));
...@@ -535,8 +535,8 @@ void main() { ...@@ -535,8 +535,8 @@ void main() {
testWidgets('giving clipBehaviour not a Clip.None, will add a ClipPath to the tree', (WidgetTester tester) async { testWidgets('giving clipBehaviour not a Clip.None, will add a ClipPath to the tree', (WidgetTester tester) async {
final Container container = Container( final Container container = Container(
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
decoration: BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.circular(1), borderRadius: BorderRadius.all(Radius.circular(1)),
), ),
child: const SizedBox(), child: const SizedBox(),
); );
...@@ -636,10 +636,10 @@ void main() { ...@@ -636,10 +636,10 @@ void main() {
testWidgets('using clipBehaviour and shadow, should not clip the shadow', (WidgetTester tester) async { testWidgets('using clipBehaviour and shadow, should not clip the shadow', (WidgetTester tester) async {
final Container container = Container( final Container container = Container(
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
decoration: BoxDecoration( decoration: const BoxDecoration(
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.all(Radius.circular(30)),
color: Colors.red, color: Colors.red,
boxShadow: const <BoxShadow>[ boxShadow: <BoxShadow>[
BoxShadow( BoxShadow(
color: Colors.blue, color: Colors.blue,
offset: Offset.zero, offset: Offset.zero,
......
...@@ -50,7 +50,7 @@ void main() { ...@@ -50,7 +50,7 @@ void main() {
child: Container( child: Container(
margin: const EdgeInsets.all(150.0), margin: const EdgeInsets.all(150.0),
decoration: ShapeDecoration( decoration: ShapeDecoration(
shape: BeveledRectangleBorder(borderRadius: BorderRadius.circular(20.0)), shape: const BeveledRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20.0))),
shadows: kElevationToShadow[elevation], shadows: kElevationToShadow[elevation],
), ),
height: 100.0, height: 100.0,
...@@ -114,9 +114,9 @@ void main() { ...@@ -114,9 +114,9 @@ void main() {
color: Colors.yellow[200], color: Colors.yellow[200],
child: PhysicalShape( child: PhysicalShape(
color: Colors.green[900]!, color: Colors.green[900]!,
clipper: ShapeBorderClipper( clipper: const ShapeBorderClipper(
shape: BeveledRectangleBorder( shape: BeveledRectangleBorder(
borderRadius: BorderRadius.circular(20.0), borderRadius: BorderRadius.all(Radius.circular(20.0)),
), ),
), ),
elevation: elevation, elevation: elevation,
......
...@@ -42,7 +42,7 @@ void main() { ...@@ -42,7 +42,7 @@ void main() {
style: BorderStyle.solid, style: BorderStyle.solid,
width: 1.0, width: 1.0,
), ),
borderRadius: BorderRadius.circular(10.0), borderRadius: const BorderRadius.all(Radius.circular(10.0)),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
// No shadow. // No shadow.
), ),
...@@ -85,7 +85,7 @@ void main() { ...@@ -85,7 +85,7 @@ void main() {
expect(border.left.width, 2.5); expect(border.left.width, 2.5);
expect(border.left.style, BorderStyle.solid); expect(border.left.style, BorderStyle.solid);
expect(border.left.color, const Color(0xFF101010)); expect(border.left.color, const Color(0xFF101010));
expect(actualDecoration.borderRadius, BorderRadius.circular(5.0)); expect(actualDecoration.borderRadius, const BorderRadius.all(Radius.circular(5.0)));
expect(actualDecoration.shape, BoxShape.rectangle); expect(actualDecoration.shape, BoxShape.rectangle);
expect(actualDecoration.boxShadow![0].blurRadius, 5.0); expect(actualDecoration.boxShadow![0].blurRadius, 5.0);
expect(actualDecoration.boxShadow![0].spreadRadius, 2.0); expect(actualDecoration.boxShadow![0].spreadRadius, 2.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment