Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
9cfde147
Commit
9cfde147
authored
Nov 15, 2016
by
Ian Hickson
Committed by
GitHub
Nov 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence more new analyzer warnings (#6874)
See #6861
parent
ae1881e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
binding.dart
packages/flutter_test/lib/src/binding.dart
+1
-1
controller.dart
packages/flutter_test/lib/src/controller.dart
+10
-2
No files found.
packages/flutter_test/lib/src/binding.dart
View file @
9cfde147
...
...
@@ -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
)
);
...
...
packages/flutter_test/lib/src/controller.dart
View file @
9cfde147
...
...
@@ -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
;
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment