Commit 9cfde147 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Silence more new analyzer warnings (#6874)

See #6861
parent ae1881e4
......@@ -112,7 +112,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
void initInstances() {
timeDilation = 1.0; // just in case the developer has artificially changed it for development
http.Client.clientOverride = () {
return new http.MockClient((http.Request request){
return new http.MockClient((http.BaseRequest request) {
return new Future<http.Response>.value(
new http.Response("Mocked: Unavailable.", 404, request: request)
);
......
......@@ -74,7 +74,11 @@ class WidgetController {
/// * Use [firstWidget] if you expect to match several but only want the first.
Iterable<Widget/*=T*/> widgetList/*<T extends Widget>*/(Finder finder) {
TestAsyncUtils.guardSync();
return finder.evaluate().map/*<T>*/((Element element) => element.widget);
return finder.evaluate().map/*<T>*/((Element element) {
// TODO(ianh): simplify once the VM can infer the return type
dynamic/*=T*/ result = element.widget;
return result;
});
}
......@@ -219,7 +223,11 @@ class WidgetController {
/// * Use [firstRenderObject] if you expect to match several but only want the first.
Iterable<RenderObject/*=T*/> renderObjectList/*<T extends RenderObject>*/(Finder finder) {
TestAsyncUtils.guardSync();
return finder.evaluate().map/*<T>*/((Element element) => element.renderObject);
return finder.evaluate().map/*<T>*/((Element element) {
// TODO(ianh): simplify once the VM can infer the return type
dynamic/*=T*/ result = element.renderObject;
return result;
});
}
......
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