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

Add fixes for Stack deprecation (#73989)

parent 6a32859e
......@@ -11,6 +11,52 @@
version: 1
transforms:
# Changes made in https://github.com/flutter/flutter/pull/66305
- title: 'Migrate to clipBehavior'
date: 2020-09-22
element:
uris: [ 'widgets.dart' ]
field: 'overflow'
inClass: 'Stack'
changes:
- kind: 'rename'
newName: 'clipBehavior'
# Changes made in https://github.com/flutter/flutter/pull/66305
- title: 'Migrate to clipBehavior'
date: 2020-09-22
element:
uris: [ 'widgets.dart' ]
constructor: ''
inClass: 'Stack'
oneOf:
- if: "overflow == 'Overflow.clip'"
changes:
- kind: 'addParameter'
index: 0
name: 'clipBehavior'
style: optional_named
argumentValue:
expression: 'Clip.hardEdge'
requiredIf: "overflow == 'Overflow.clip'"
- kind: 'removeParameter'
name: 'overflow'
- if: "overflow == 'Overflow.visible'"
changes:
- kind: 'addParameter'
index: 0
name: 'clipBehavior'
style: optional_named
argumentValue:
expression: 'Clip.none'
requiredIf: "overflow == 'Overflow.visible'"
- kind: 'removeParameter'
name: 'overflow'
variables:
overflow:
kind: 'fragment'
value: 'arguments[overflow]'
# Change made in https://github.com/flutter/flutter/pull/44189.
- title: 'Rename to dependOnInheritedElement'
date: 2019-11-22
......
......@@ -23,4 +23,9 @@ void main() {
buildContext.ancestorStateOfType(TypeMatcher<targetType>());
buildContext.rootAncestorStateOfType(TypeMatcher<targetType>());
buildContext.ancestorRenderObjectOfType(TypeMatcher<targetType>());
// Changes made in https://github.com/flutter/flutter/pull/66305
const Stack stack = Stack(overflow: Overflow.visible);
const Stack stack = Stack(overflow: Overflow.clip);
final behavior = stack.overflow;
}
......@@ -23,4 +23,9 @@ void main() {
buildContext.findAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
// Changes made in https://github.com/flutter/flutter/pull/66305
const Stack stack = Stack(clipBehavior: Clip.none);
const Stack stack = Stack(clipBehavior: Clip.hardEdge);
final behavior = stack.clipBehavior;
}
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