Unverified Commit 535392bf authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

added tests, removed API (#69620)

parent ddc0dc13
......@@ -11,6 +11,149 @@
version: 1
transforms:
# Change made in https://github.com/flutter/flutter/pull/44189.
- title: 'Rename to dependOnInheritedElement'
date: 2019-11-22
element:
uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ]
inClass: 'BuildContext'
method: 'inheritFromElement'
changes:
- kind: 'rename'
newName: 'dependOnInheritedElement'
# Change made in https://github.com/flutter/flutter/pull/44189.
- title: 'Migrate to dependOnInheritedWidgetOfExactType'
date: 2019-11-22
element:
uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ]
inClass: 'BuildContext'
method: 'inheritFromWidgetOfExactType'
changes:
- kind: 'rename'
newName: 'dependOnInheritedWidgetOfExactType'
- kind: 'removeParameter'
index: 0
- kind: 'addTypeParameter'
index: 0
name: 'T'
argumentValue:
expression: '{% type %}'
variables:
type:
kind: fragment
value: 'arguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
- title: 'Migrate to getElementForInheritedWidgetOfExactType'
date: 2019-11-22
element:
uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ]
inClass: 'BuildContext'
method: 'ancestorInheritedElementForWidgetOfExactType'
changes:
- kind: 'rename'
newName: 'getElementForInheritedWidgetOfExactType'
- kind: 'removeParameter'
index: 0
- kind: 'addTypeParameter'
index: 0
name: 'T'
argumentValue:
expression: '{% type %}'
variables:
type:
kind: fragment
value: 'arguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
- title: 'Migrate to findAncestorWidgetOfExactType'
date: 2019-11-22
element:
uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ]
inClass: 'BuildContext'
method: 'ancestorWidgetOfExactType'
changes:
- kind: 'rename'
newName: 'findAncestorWidgetOfExactType'
- kind: 'removeParameter'
index: 0
- kind: 'addTypeParameter'
index: 0
name: 'T'
argumentValue:
expression: '{% type %}'
variables:
type:
kind: fragment
value: 'arguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
- title: 'Migrate to findAncestorStateOfType'
date: 2019-11-22
element:
uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ]
inClass: 'BuildContext'
method: 'ancestorStateOfType'
changes:
- kind: 'rename'
newName: 'findAncestorStateOfType'
- kind: 'removeParameter'
index: 0
- kind: 'addTypeParameter'
index: 0
name: 'T'
argumentValue:
expression: '{% type %}'
variables:
type:
kind: fragment
value: 'arguments[0].typeArguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
- title: 'Migrate to rootAncestorStateOfType'
date: 2019-11-22
element:
uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ]
inClass: 'BuildContext'
method: 'rootAncestorStateOfType'
changes:
- kind: 'rename'
newName: 'findRootAncestorStateOfType'
- kind: 'removeParameter'
index: 0
- kind: 'addTypeParameter'
index: 0
name: 'T'
argumentValue:
expression: '{% type %}'
variables:
type:
kind: fragment
value: 'arguments[0].typeArguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
- title: 'Migrate to ancestorRenderObjectOfType'
date: 2019-11-22
element:
uris: [ 'material.dart', 'cupertino.dart', 'widgets.dart' ]
inClass: 'BuildContext'
method: 'ancestorRenderObjectOfType'
changes:
- kind: 'rename'
newName: 'findAncestorRenderObjectOfType'
- kind: 'removeParameter'
index: 0
- kind: 'addTypeParameter'
index: 0
name: 'T'
argumentValue:
expression: '{% type %}'
variables:
type:
kind: fragment
value: 'arguments[0].typeArguments[0]'
# Changes made in https://github.com/flutter/flutter/pull/45941
- title: 'Rename to deferFirstFrame'
date: 2020-12-23
......
......@@ -17,4 +17,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.inheritFromElement(ancestor);
// Changes made in https://github.com/flutter/flutter/pull/44189
const BuildContext buildContext = Element(myWidget);
buildContext.inheritFromElement(ancestor);
buildContext.inheritFromWidgetOfExactType(targetType);
buildContext.ancestorInheritedElementForWidgetOfExactType(targetType);
buildContext.ancestorWidgetOfExactType(targetType);
buildContext.ancestorStateOfType(TypeMatcher<targetType>());
buildContext.rootAncestorStateOfType(TypeMatcher<targetType>());
buildContext.ancestorRenderObjectOfType(TypeMatcher<targetType>());
}
......@@ -17,4 +17,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
// Changes made in https://github.com/flutter/flutter/pull/44189
const BuildContext buildContext = Element(myWidget);
buildContext.dependOnInheritedElement(ancestor);
buildContext.dependOnInheritedWidgetOfExactType<targetType>();
buildContext.getElementForInheritedWidgetOfExactType<targetType>();
buildContext.findAncestorWidgetOfExactType<targetType>();
buildContext.findAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
}
......@@ -16,4 +16,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.inheritFromElement(ancestor);
// Changes made in https://github.com/flutter/flutter/pull/44189
const BuildContext buildContext = Element(myWidget);
buildContext.inheritFromElement(ancestor);
buildContext.inheritFromWidgetOfExactType(targetType);
buildContext.ancestorInheritedElementForWidgetOfExactType(targetType);
buildContext.ancestorWidgetOfExactType(targetType);
buildContext.ancestorStateOfType(TypeMatcher<targetType>());
buildContext.rootAncestorStateOfType(TypeMatcher<targetType>());
buildContext.ancestorRenderObjectOfType(TypeMatcher<targetType>());
}
......@@ -14,6 +14,16 @@ void main() {
binding.allowFirstFrame();
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
// Changes made in https://github.com/flutter/flutter/pull/44189
const BuildContext buildContext = Element(myWidget);
buildContext.dependOnInheritedElement(ancestor);
buildContext.dependOnInheritedWidgetOfExactType<targetType>();
buildContext.getElementForInheritedWidgetOfExactType<targetType>();
buildContext.findAncestorWidgetOfExactType<targetType>();
buildContext.findAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
}
......@@ -13,4 +13,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.inheritFromElement(ancestor);
// Changes made in https://github.com/flutter/flutter/pull/44189
const BuildContext buildContext = Element(myWidget);
buildContext.inheritFromElement(ancestor);
buildContext.inheritFromWidgetOfExactType(targetType);
buildContext.ancestorInheritedElementForWidgetOfExactType(targetType);
buildContext.ancestorWidgetOfExactType(targetType);
buildContext.ancestorStateOfType(TypeMatcher<targetType>());
buildContext.rootAncestorStateOfType(TypeMatcher<targetType>());
buildContext.ancestorRenderObjectOfType(TypeMatcher<targetType>());
}
......@@ -13,4 +13,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
// Changes made in https://github.com/flutter/flutter/pull/44189
const BuildContext buildContext = Element(myWidget);
buildContext.dependOnInheritedElement(ancestor);
buildContext.dependOnInheritedWidgetOfExactType<targetType>();
buildContext.getElementForInheritedWidgetOfExactType<targetType>();
buildContext.findAncestorWidgetOfExactType<targetType>();
buildContext.findAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
}
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