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
da6e5297
Unverified
Commit
da6e5297
authored
Dec 14, 2021
by
Sam Rawlins
Committed by
GitHub
Dec 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add null return statements to nullable functions with implicit returns (#94760)
parent
f248064a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
16 additions
and
11 deletions
+16
-11
restoration.dart
packages/flutter/lib/src/services/restoration.dart
+1
-1
actions.dart
packages/flutter/lib/src/widgets/actions.dart
+1
-1
editable_text.dart
packages/flutter/lib/src/widgets/editable_text.dart
+3
-3
checkbox_test.dart
packages/flutter/test/material/checkbox_test.dart
+1
-0
rendering_tester.dart
packages/flutter/test/rendering/rendering_tester.dart
+1
-0
actions_test.dart
packages/flutter/test/widgets/actions_test.dart
+4
-5
clipboard_utils.dart
packages/flutter/test/widgets/clipboard_utils.dart
+1
-0
router_test.dart
packages/flutter/test/widgets/router_test.dart
+1
-0
shortcuts_test.dart
packages/flutter/test/widgets/shortcuts_test.dart
+1
-0
slotted_render_object_widget_test.dart
...utter/test/widgets/slotted_render_object_widget_test.dart
+1
-1
title_test.dart
packages/flutter/test/widgets/title_test.dart
+1
-0
No files found.
packages/flutter/lib/src/services/restoration.dart
View file @
da6e5297
...
@@ -304,7 +304,7 @@ class RestorationManager extends ChangeNotifier {
...
@@ -304,7 +304,7 @@ class RestorationManager extends ChangeNotifier {
);
);
}
}
Future
<
Object
?
>
_methodHandler
(
MethodCall
call
)
async
{
Future
<
void
>
_methodHandler
(
MethodCall
call
)
async
{
switch
(
call
.
method
)
{
switch
(
call
.
method
)
{
case
'push'
:
case
'push'
:
_parseAndHandleRestorationUpdateFromEngine
(
call
.
arguments
as
Map
<
Object
?,
Object
?>);
_parseAndHandleRestorationUpdateFromEngine
(
call
.
arguments
as
Map
<
Object
?,
Object
?>);
...
...
packages/flutter/lib/src/widgets/actions.dart
View file @
da6e5297
...
@@ -1489,7 +1489,7 @@ class PrioritizedAction extends Action<PrioritizedIntents> {
...
@@ -1489,7 +1489,7 @@ class PrioritizedAction extends Action<PrioritizedIntents> {
}
}
@override
@override
Object
?
invoke
(
PrioritizedIntents
intent
)
{
void
invoke
(
PrioritizedIntents
intent
)
{
assert
(
_selectedAction
!=
null
);
assert
(
_selectedAction
!=
null
);
assert
(
_selectedIntent
!=
null
);
assert
(
_selectedIntent
!=
null
);
_selectedAction
.
invoke
(
_selectedIntent
);
_selectedAction
.
invoke
(
_selectedIntent
);
...
...
packages/flutter/lib/src/widgets/editable_text.dart
View file @
da6e5297
...
@@ -3741,13 +3741,13 @@ class _UpdateTextSelectionToAdjacentLineAction<T extends DirectionalCaretMovemen
...
@@ -3741,13 +3741,13 @@ class _UpdateTextSelectionToAdjacentLineAction<T extends DirectionalCaretMovemen
}
}
@override
@override
Object
?
invoke
(
T
intent
,
[
BuildContext
?
context
])
{
void
invoke
(
T
intent
,
[
BuildContext
?
context
])
{
assert
(
state
.
_value
.
selection
.
isValid
);
assert
(
state
.
_value
.
selection
.
isValid
);
final
bool
collapseSelection
=
intent
.
collapseSelection
||
!
state
.
widget
.
selectionEnabled
;
final
bool
collapseSelection
=
intent
.
collapseSelection
||
!
state
.
widget
.
selectionEnabled
;
final
TextEditingValue
value
=
state
.
_textEditingValueforTextLayoutMetrics
;
final
TextEditingValue
value
=
state
.
_textEditingValueforTextLayoutMetrics
;
if
(!
value
.
selection
.
isValid
)
{
if
(!
value
.
selection
.
isValid
)
{
return
null
;
return
;
}
}
if
(
_verticalMovementRun
?.
isValid
==
false
)
{
if
(
_verticalMovementRun
?.
isValid
==
false
)
{
...
@@ -3807,7 +3807,7 @@ class _CopySelectionAction extends ContextAction<CopySelectionTextIntent> {
...
@@ -3807,7 +3807,7 @@ class _CopySelectionAction extends ContextAction<CopySelectionTextIntent> {
final
EditableTextState
state
;
final
EditableTextState
state
;
@override
@override
Object
?
invoke
(
CopySelectionTextIntent
intent
,
[
BuildContext
?
context
])
{
void
invoke
(
CopySelectionTextIntent
intent
,
[
BuildContext
?
context
])
{
if
(
intent
.
collapseSelection
)
{
if
(
intent
.
collapseSelection
)
{
state
.
cutSelection
(
intent
.
cause
);
state
.
cutSelection
(
intent
.
cause
);
}
else
{
}
else
{
...
...
packages/flutter/test/material/checkbox_test.dart
View file @
da6e5297
...
@@ -1077,6 +1077,7 @@ void main() {
...
@@ -1077,6 +1077,7 @@ void main() {
}
}
return
inactivePressedOverlayColor
;
return
inactivePressedOverlayColor
;
}
}
return
null
;
}
}
const
double
splashRadius
=
24.0
;
const
double
splashRadius
=
24.0
;
TestGesture
gesture
;
TestGesture
gesture
;
...
...
packages/flutter/test/rendering/rendering_tester.dart
View file @
da6e5297
...
@@ -305,6 +305,7 @@ class TestClipPaintingContext extends PaintingContext {
...
@@ -305,6 +305,7 @@ class TestClipPaintingContext extends PaintingContext {
ClipRectLayer
?
oldLayer
,
ClipRectLayer
?
oldLayer
,
})
{
})
{
this
.
clipBehavior
=
clipBehavior
;
this
.
clipBehavior
=
clipBehavior
;
return
null
;
}
}
Clip
clipBehavior
=
Clip
.
none
;
Clip
clipBehavior
=
Clip
.
none
;
...
...
packages/flutter/test/widgets/actions_test.dart
View file @
da6e5297
...
@@ -1701,9 +1701,8 @@ class TestContextAction extends ContextAction<TestIntent> {
...
@@ -1701,9 +1701,8 @@ class TestContextAction extends ContextAction<TestIntent> {
List
<
BuildContext
?>
capturedContexts
=
<
BuildContext
?>[];
List
<
BuildContext
?>
capturedContexts
=
<
BuildContext
?>[];
@override
@override
Object
?
invoke
(
covariant
TestIntent
intent
,
[
BuildContext
?
context
])
{
void
invoke
(
covariant
TestIntent
intent
,
[
BuildContext
?
context
])
{
capturedContexts
.
add
(
context
);
capturedContexts
.
add
(
context
);
return
null
;
}
}
}
}
...
@@ -1724,7 +1723,7 @@ class LogInvocationAction extends Action<LogIntent> {
...
@@ -1724,7 +1723,7 @@ class LogInvocationAction extends Action<LogIntent> {
bool
get
isActionEnabled
=>
enabled
;
bool
get
isActionEnabled
=>
enabled
;
@override
@override
Object
?
invoke
(
LogIntent
intent
)
{
void
invoke
(
LogIntent
intent
)
{
final
Action
<
LogIntent
>?
callingAction
=
this
.
callingAction
;
final
Action
<
LogIntent
>?
callingAction
=
this
.
callingAction
;
if
(
callingAction
==
null
)
{
if
(
callingAction
==
null
)
{
intent
.
log
.
add
(
'
$actionName
.invoke'
);
intent
.
log
.
add
(
'
$actionName
.invoke'
);
...
@@ -1755,7 +1754,7 @@ class LogInvocationContextAction extends ContextAction<LogIntent> {
...
@@ -1755,7 +1754,7 @@ class LogInvocationContextAction extends ContextAction<LogIntent> {
bool
get
isActionEnabled
=>
enabled
;
bool
get
isActionEnabled
=>
enabled
;
@override
@override
Object
?
invoke
(
LogIntent
intent
,
[
BuildContext
?
context
])
{
void
invoke
(
LogIntent
intent
,
[
BuildContext
?
context
])
{
invokeContext
=
context
;
invokeContext
=
context
;
final
Action
<
LogIntent
>?
callingAction
=
this
.
callingAction
;
final
Action
<
LogIntent
>?
callingAction
=
this
.
callingAction
;
if
(
callingAction
==
null
)
{
if
(
callingAction
==
null
)
{
...
@@ -1792,5 +1791,5 @@ class RedirectOutputAction extends LogInvocationAction {
...
@@ -1792,5 +1791,5 @@ class RedirectOutputAction extends LogInvocationAction {
final
List
<
String
>
newLog
;
final
List
<
String
>
newLog
;
@override
@override
Object
?
invoke
(
LogIntent
intent
)
=>
super
.
invoke
(
LogIntent
(
log:
newLog
));
void
invoke
(
LogIntent
intent
)
=>
super
.
invoke
(
LogIntent
(
log:
newLog
));
}
}
packages/flutter/test/widgets/clipboard_utils.dart
View file @
da6e5297
...
@@ -29,5 +29,6 @@ class MockClipboard {
...
@@ -29,5 +29,6 @@ class MockClipboard {
_clipboardData
=
methodCall
.
arguments
;
_clipboardData
=
methodCall
.
arguments
;
break
;
break
;
}
}
return
null
;
}
}
}
}
packages/flutter/test/widgets/router_test.dart
View file @
da6e5297
...
@@ -792,6 +792,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
...
@@ -792,6 +792,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
SystemChannels
.
navigation
,
SystemChannels
.
navigation
,
(
MethodCall
methodCall
)
async
{
(
MethodCall
methodCall
)
async
{
log
.
add
(
methodCall
);
log
.
add
(
methodCall
);
return
null
;
}
}
);
);
final
RouteInformationProvider
provider
=
PlatformRouteInformationProvider
(
final
RouteInformationProvider
provider
=
PlatformRouteInformationProvider
(
...
...
packages/flutter/test/widgets/shortcuts_test.dart
View file @
da6e5297
...
@@ -103,6 +103,7 @@ Widget activatorTester(
...
@@ -103,6 +103,7 @@ Widget activatorTester(
if
(
hasSecond
)
if
(
hasSecond
)
TestIntent2:
TestAction
(
onInvoke:
(
Intent
intent
)
{
TestIntent2:
TestAction
(
onInvoke:
(
Intent
intent
)
{
onInvoke2
(
intent
);
onInvoke2
(
intent
);
return
null
;
}),
}),
},
},
child:
Shortcuts
(
child:
Shortcuts
(
...
...
packages/flutter/test/widgets/slotted_render_object_widget_test.dart
View file @
da6e5297
...
@@ -212,7 +212,7 @@ class _Diagonal extends RenderObjectWidget with SlottedMultiChildRenderObjectWid
...
@@ -212,7 +212,7 @@ class _Diagonal extends RenderObjectWidget with SlottedMultiChildRenderObjectWid
Iterable
<
_DiagonalSlot
>
get
slots
=>
_DiagonalSlot
.
values
;
Iterable
<
_DiagonalSlot
>
get
slots
=>
_DiagonalSlot
.
values
;
@override
@override
Widget
?
childForSlot
(
Objec
t
slot
)
{
Widget
?
childForSlot
(
_DiagonalSlo
t
slot
)
{
switch
(
slot
)
{
switch
(
slot
)
{
case
_DiagonalSlot
.
topLeft
:
case
_DiagonalSlot
.
topLeft
:
return
topLeft
;
return
topLeft
;
...
...
packages/flutter/test/widgets/title_test.dart
View file @
da6e5297
...
@@ -38,6 +38,7 @@ void main() {
...
@@ -38,6 +38,7 @@ void main() {
tester
.
binding
.
defaultBinaryMessenger
.
setMockMethodCallHandler
(
SystemChannels
.
platform
,
(
MethodCall
methodCall
)
async
{
tester
.
binding
.
defaultBinaryMessenger
.
setMockMethodCallHandler
(
SystemChannels
.
platform
,
(
MethodCall
methodCall
)
async
{
log
.
add
(
methodCall
);
log
.
add
(
methodCall
);
return
null
;
});
});
await
tester
.
pumpWidget
(
Title
(
await
tester
.
pumpWidget
(
Title
(
...
...
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