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
71c1f6c3
Unverified
Commit
71c1f6c3
authored
Sep 23, 2020
by
Alexandre Ardhuin
Committed by
GitHub
Sep 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable lint unnecessary_nullable_for_final_variable_declarations (#66387)
parent
97d67993
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
8 deletions
+11
-8
analysis_options.yaml
analysis_options.yaml
+1
-0
message_codecs.dart
packages/flutter/lib/src/services/message_codecs.dart
+2
-2
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+1
-1
list_wheel_scroll_view.dart
packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
+5
-1
widget_inspector.dart
packages/flutter/lib/src/widgets/widget_inspector.dart
+2
-4
No files found.
analysis_options.yaml
View file @
71c1f6c3
...
...
@@ -192,6 +192,7 @@ linter:
-
unnecessary_new
-
unnecessary_null_aware_assignments
-
unnecessary_null_in_if_null_operators
-
unnecessary_nullable_for_final_variable_declarations
-
unnecessary_overrides
-
unnecessary_parenthesis
-
unnecessary_statements
...
...
packages/flutter/lib/src/services/message_codecs.dart
View file @
71c1f6c3
...
...
@@ -453,13 +453,13 @@ class StandardMessageCodec implements MessageCodec<dynamic> {
return
buffer
.
getFloat64List
(
length
);
case
_valueList:
final
int
length
=
readSize
(
buffer
);
final
dynamic
result
=
List
<
dynamic
>.
filled
(
length
,
null
,
growable:
false
);
final
List
<
dynamic
>
result
=
List
<
dynamic
>.
filled
(
length
,
null
,
growable:
false
);
for
(
int
i
=
0
;
i
<
length
;
i
++)
result
[
i
]
=
readValue
(
buffer
);
return
result
;
case
_valueMap:
final
int
length
=
readSize
(
buffer
);
final
dynamic
result
=
<
dynamic
,
dynamic
>{};
final
Map
<
dynamic
,
dynamic
>
result
=
<
dynamic
,
dynamic
>{};
for
(
int
i
=
0
;
i
<
length
;
i
++)
result
[
readValue
(
buffer
)]
=
readValue
(
buffer
);
return
result
;
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
71c1f6c3
...
...
@@ -321,7 +321,7 @@ abstract class GlobalKey<T extends State<StatefulWidget>> extends Key {
final
Element
?
element
=
_currentElement
;
if
(
element
is
StatefulElement
)
{
final
StatefulElement
statefulElement
=
element
;
final
State
?
state
=
statefulElement
.
state
;
final
State
state
=
statefulElement
.
state
;
if
(
state
is
T
)
return
state
;
}
...
...
packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
View file @
71c1f6c3
...
...
@@ -181,7 +181,11 @@ class ListWheelChildBuilderDelegate extends ListWheelChildDelegate {
@override
Widget
?
build
(
BuildContext
context
,
int
index
)
{
if
(
childCount
==
null
)
{
final
Widget
?
child
=
builder
(
context
,
index
);
final
Widget
child
=
builder
(
context
,
index
);
// `child` has a non-nullable return type, but might be null when
// running with weak checking, so we need to null check it anyway (and
// ignore the warning that the null-handling logic is dead code).
// ignore: dead_code
return
child
==
null
?
null
:
IndexedSemantics
(
child:
child
,
index:
index
);
}
if
(
index
<
0
||
index
>=
childCount
!)
...
...
packages/flutter/lib/src/widgets/widget_inspector.dart
View file @
71c1f6c3
...
...
@@ -1048,10 +1048,8 @@ mixin WidgetInspectorService {
renderObject
.
markNeedsPaint
();
renderObject
.
visitChildren
(
markTreeNeedsPaint
);
}
final
RenderObject
?
root
=
RendererBinding
.
instance
!.
renderView
;
if
(
root
!=
null
)
{
markTreeNeedsPaint
(
root
);
}
final
RenderObject
root
=
RendererBinding
.
instance
!.
renderView
;
markTreeNeedsPaint
(
root
);
}
else
{
debugOnProfilePaint
=
null
;
}
...
...
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