Commit 130a5cb6 authored by Adam Barth's avatar Adam Barth

Fix analyzer warnings

We were just missing a few type casts in tests to make the analyzer happy.
parent 27e6381e
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'package:sky/animation.dart'; import 'package:sky/animation.dart';
import 'package:sky/src/widgets/animated_component.dart';
import 'package:sky/src/widgets/basic.dart'; import 'package:sky/src/widgets/basic.dart';
import 'package:sky/src/widgets/framework.dart'; import 'package:sky/src/widgets/framework.dart';
import 'package:sky/src/widgets/global_key_watcher.dart'; import 'package:sky/src/widgets/global_key_watcher.dart';
......
...@@ -10,7 +10,7 @@ class _ServiceMocker { ...@@ -10,7 +10,7 @@ class _ServiceMocker {
// Map of interface names to mock implementations. // Map of interface names to mock implementations.
Map<String, Object> _interfaceMock = new Map<String, Object>(); Map<String, Object> _interfaceMock = new Map<String, Object>();
bool _requestService(String url, Object proxy) { bool _requestService(String url, dynamic proxy) {
Object mock = _interfaceMock[proxy.impl.name]; Object mock = _interfaceMock[proxy.impl.name];
if (mock != null) { if (mock != null) {
// Replace the proxy's implementation of the service interface with the // Replace the proxy's implementation of the service interface with the
......
import 'package:mojo_services/keyboard/keyboard.mojom.dart'; import 'package:mojo_services/keyboard/keyboard.mojom.dart';
import 'package:sky/rendering.dart';
import 'package:sky/services.dart'; import 'package:sky/services.dart';
import 'package:sky/widgets.dart'; import 'package:sky/widgets.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
...@@ -9,7 +10,7 @@ import '../services/mock_services.dart'; ...@@ -9,7 +10,7 @@ import '../services/mock_services.dart';
class MockKeyboard implements KeyboardService { class MockKeyboard implements KeyboardService {
KeyboardClient client; KeyboardClient client;
void show(Object client, int type) { void show(KeyboardClientStub client, int type) {
this.client = client.impl; this.client = client.impl;
} }
...@@ -41,7 +42,7 @@ void main() { ...@@ -41,7 +42,7 @@ void main() {
tester.pumpFrame(builder); tester.pumpFrame(builder);
Input input = tester.findWidget((Widget widget) => widget.key == inputKey); Input input = tester.findWidget((Widget widget) => widget.key == inputKey);
Size emptyInputSize = input.renderObject.size; Size emptyInputSize = (input.renderObject as RenderBox).size;
// Simulate entry of text through the keyboard. // Simulate entry of text through the keyboard.
expect(mockKeyboard.client, isNotNull); expect(mockKeyboard.client, isNotNull);
...@@ -54,6 +55,6 @@ void main() { ...@@ -54,6 +55,6 @@ void main() {
tester.pumpFrame(builder); tester.pumpFrame(builder);
// Check that the Input with text has the same size as the empty Input. // Check that the Input with text has the same size as the empty Input.
expect(input.renderObject.size, equals(emptyInputSize)); expect((input.renderObject as RenderBox).size, equals(emptyInputSize));
}); });
} }
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