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
b7fd5426
Commit
b7fd5426
authored
Apr 28, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable avoid_as lint (#3612)
Related to #3608
parent
26ed1e71
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
widget_tester.dart
packages/flutter_test/lib/src/widget_tester.dart
+4
-2
flutter_analysis_options
packages/flutter_tools/flutter_analysis_options
+1
-1
cache.dart
packages/flutter_tools/lib/src/cache.dart
+2
-1
No files found.
packages/flutter_test/lib/src/widget_tester.dart
View file @
b7fd5426
...
...
@@ -118,8 +118,10 @@ class WidgetTester {
Element
element
=
finder
.
findFirst
(
this
);
Widget
widget
=
element
.
widget
;
if
(
widget
is
StatefulWidget
)
return
(
element
as
StatefulElement
).
state
;
if
(
widget
is
StatefulWidget
)
{
StatefulElement
statefulElement
=
element
;
return
statefulElement
.
state
;
}
throw
new
ElementNotFoundError
(
'Widget of type
${widget.runtimeType}
found by
${finder.description}
does not correspond to a StatefulWidget'
...
...
packages/flutter_tools/flutter_analysis_options
View file @
b7fd5426
...
...
@@ -29,7 +29,7 @@ linter:
- always_declare_return_types
- always_specify_types
- annotate_overrides
# - avoid_as # https://github.com/dart-lang/linter/issues/195
- avoid_as
- avoid_init_to_null
# - avoid_return_types_on_setters # https://github.com/dart-lang/linter/issues/202
- camel_case_types
...
...
packages/flutter_tools/lib/src/cache.dart
View file @
b7fd5426
...
...
@@ -143,7 +143,8 @@ class Cache {
os
.
unzip
(
tempFile
,
location
);
tempFile
.
deleteSync
();
}
else
{
(
location
as
File
).
writeAsBytesSync
(
fileBytes
,
flush:
true
);
File
file
=
location
;
file
.
writeAsBytesSync
(
fileBytes
,
flush:
true
);
}
}
}
...
...
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