diff --git a/packages/flutter/lib/fix_data.yaml b/packages/flutter/lib/fix_data.yaml index a6dd53acff..4f6119de15 100644 --- a/packages/flutter/lib/fix_data.yaml +++ b/packages/flutter/lib/fix_data.yaml @@ -15,6 +15,98 @@ version: 1 transforms: + # Changes made in https://github.com/flutter/flutter/pull/79160 + - title: "Migrate to 'dragAnchorStrategy'" + date: 2021-04-05 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + field: 'dragAnchor' + inClass: 'Draggable' + changes: + - kind: 'rename' + newName: 'dragAnchorStrategy' + + # Changes made in https://github.com/flutter/flutter/pull/79160 + - title: "Migrate to 'dragAnchorStrategy'" + date: 2021-04-05 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'Draggable' + oneOf: + - if: "dragAnchor == 'DragAnchor.child'" + changes: + - kind: 'addParameter' + index: 9 + name: 'dragAnchorStrategy' + style: optional_named + argumentValue: + expression: 'childDragAnchorStrategy' + requiredIf: "dragAnchor == 'DragAnchor.child'" + - kind: 'removeParameter' + name: 'dragAnchor' + - if: "dragAnchor == 'DragAnchor.pointer'" + changes: + - kind: 'addParameter' + index: 9 + name: 'dragAnchorStrategy' + style: optional_named + argumentValue: + expression: 'pointerDragAnchorStrategy' + requiredIf: "dragAnchor == 'DragAnchor.pointer'" + - kind: 'removeParameter' + name: 'dragAnchor' + variables: + dragAnchor: + kind: 'fragment' + value: 'arguments[dragAnchor]' + + # Changes made in https://github.com/flutter/flutter/pull/79160 + - title: "Migrate to 'dragAnchorStrategy'" + date: 2021-04-05 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + field: 'dragAnchor' + inClass: 'LongPressDraggable' + changes: + - kind: 'rename' + newName: 'dragAnchorStrategy' + + # Changes made in https://github.com/flutter/flutter/pull/79160 + - title: "Migrate to 'dragAnchorStrategy'" + date: 2021-04-05 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'LongPressDraggable' + oneOf: + - if: "dragAnchor == 'DragAnchor.child'" + changes: + - kind: 'addParameter' + index: 9 + name: 'dragAnchorStrategy' + style: optional_named + argumentValue: + expression: 'childDragAnchorStrategy' + requiredIf: "dragAnchor == 'DragAnchor.child'" + - kind: 'removeParameter' + name: 'dragAnchor' + - if: "dragAnchor == 'DragAnchor.pointer'" + changes: + - kind: 'addParameter' + index: 9 + name: 'dragAnchorStrategy' + style: optional_named + argumentValue: + expression: 'pointerDragAnchorStrategy' + requiredIf: "dragAnchor == 'DragAnchor.pointer'" + - kind: 'removeParameter' + name: 'dragAnchor' + variables: + dragAnchor: + kind: 'fragment' + value: 'arguments[dragAnchor]' + # Changes made in https://github.com/flutter/flutter/pull/66482 - title: "Migrate to 'TextSelectionThemeData'" date: 2020-09-24 diff --git a/packages/flutter/test_fixes/cupertino.dart b/packages/flutter/test_fixes/cupertino.dart index 508c2062d0..4c456a17f2 100644 --- a/packages/flutter/test_fixes/cupertino.dart +++ b/packages/flutter/test_fixes/cupertino.dart @@ -127,4 +127,16 @@ void main() { // Changes made in https://github.com/flutter/flutter/pull/59127 const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(title: myTitle); bottomNavigationBarItem.title; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + Draggable draggable = Draggable(); + draggable = Draggable(dragAnchor: DragAnchor.child); + draggable = Draggable(dragAnchor: DragAnchor.pointer); + draggable.dragAnchor; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + LongPressDraggable longPressDraggable = LongPressDraggable(); + longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.child); + longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.pointer); + longPressDraggable.dragAnchor; } diff --git a/packages/flutter/test_fixes/cupertino.dart.expect b/packages/flutter/test_fixes/cupertino.dart.expect index fe25c69b44..6b99c93729 100644 --- a/packages/flutter/test_fixes/cupertino.dart.expect +++ b/packages/flutter/test_fixes/cupertino.dart.expect @@ -127,4 +127,16 @@ void main() { // Changes made in https://github.com/flutter/flutter/pull/59127 const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(label: myTitle); bottomNavigationBarItem.label; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + Draggable draggable = Draggable(); + draggable = Draggable(dragAnchorStrategy: childDragAnchorStrategy); + draggable = Draggable(dragAnchorStrategy: pointerDragAnchorStrategy); + draggable.dragAnchorStrategy; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + LongPressDraggable longPressDraggable = LongPressDraggable(); + longPressDraggable = LongPressDraggable(dragAnchorStrategy: childDragAnchorStrategy); + longPressDraggable = LongPressDraggable(dragAnchorStrategy: pointerDragAnchorStrategy); + longPressDraggable.dragAnchorStrategy; } diff --git a/packages/flutter/test_fixes/material.dart b/packages/flutter/test_fixes/material.dart index 6ba929d361..3dd2aa92de 100644 --- a/packages/flutter/test_fixes/material.dart +++ b/packages/flutter/test_fixes/material.dart @@ -286,4 +286,16 @@ void main() { textSelectionHandleColor: Colors.yellow, useTextSelectionTheme: false, ); + + // Changes made in https://github.com/flutter/flutter/pull/79160 + Draggable draggable = Draggable(); + draggable = Draggable(dragAnchor: DragAnchor.child); + draggable = Draggable(dragAnchor: DragAnchor.pointer); + draggable.dragAnchor; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + LongPressDraggable longPressDraggable = LongPressDraggable(); + longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.child); + longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.pointer); + longPressDraggable.dragAnchor; } diff --git a/packages/flutter/test_fixes/material.dart.expect b/packages/flutter/test_fixes/material.dart.expect index 3a5f868094..1df414c826 100644 --- a/packages/flutter/test_fixes/material.dart.expect +++ b/packages/flutter/test_fixes/material.dart.expect @@ -258,4 +258,16 @@ void main() { ThemeData.raw( textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.blue, selectionColor: Colors.red, selectionHandleColor: Colors.yellow,), ); + + // Changes made in https://github.com/flutter/flutter/pull/79160 + Draggable draggable = Draggable(); + draggable = Draggable(dragAnchorStrategy: childDragAnchorStrategy); + draggable = Draggable(dragAnchorStrategy: pointerDragAnchorStrategy); + draggable.dragAnchorStrategy; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + LongPressDraggable longPressDraggable = LongPressDraggable(); + longPressDraggable = LongPressDraggable(dragAnchorStrategy: childDragAnchorStrategy); + longPressDraggable = LongPressDraggable(dragAnchorStrategy: pointerDragAnchorStrategy); + longPressDraggable.dragAnchorStrategy; } diff --git a/packages/flutter/test_fixes/widgets.dart b/packages/flutter/test_fixes/widgets.dart index 82ac8c12fd..21c9535997 100644 --- a/packages/flutter/test_fixes/widgets.dart +++ b/packages/flutter/test_fixes/widgets.dart @@ -95,4 +95,16 @@ void main() { // Changes made in https://github.com/flutter/flutter/pull/59127 const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(title: myTitle); bottomNavigationBarItem.title; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + Draggable draggable = Draggable(); + draggable = Draggable(dragAnchor: DragAnchor.child); + draggable = Draggable(dragAnchor: DragAnchor.pointer); + draggable.dragAnchor; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + LongPressDraggable longPressDraggable = LongPressDraggable(); + longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.child); + longPressDraggable = LongPressDraggable(dragAnchor: DragAnchor.pointer); + longPressDraggable.dragAnchor; } diff --git a/packages/flutter/test_fixes/widgets.dart.expect b/packages/flutter/test_fixes/widgets.dart.expect index 196705fe71..854d81d2c4 100644 --- a/packages/flutter/test_fixes/widgets.dart.expect +++ b/packages/flutter/test_fixes/widgets.dart.expect @@ -95,4 +95,16 @@ void main() { // Changes made in https://github.com/flutter/flutter/pull/59127 const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(label: myTitle); bottomNavigationBarItem.label; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + Draggable draggable = Draggable(); + draggable = Draggable(dragAnchorStrategy: childDragAnchorStrategy); + draggable = Draggable(dragAnchorStrategy: pointerDragAnchorStrategy); + draggable.dragAnchorStrategy; + + // Changes made in https://github.com/flutter/flutter/pull/79160 + LongPressDraggable longPressDraggable = LongPressDraggable(); + longPressDraggable = LongPressDraggable(dragAnchorStrategy: childDragAnchorStrategy); + longPressDraggable = LongPressDraggable(dragAnchorStrategy: pointerDragAnchorStrategy); + longPressDraggable.dragAnchorStrategy; }