Add fixes for Stack deprecation (#73989)
This commit is contained in:
parent
6a32859eb9
commit
aace9a2ac1
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user