Unverified Commit a0f7694d authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Add dart fix for DragAnchor deprecation (#80587)

parent c3a15bf9
......@@ -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
......
......@@ -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;
}
......@@ -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;
}
......@@ -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;
}
......@@ -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;
}
......@@ -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;
}
......@@ -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;
}
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