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
8b0de38e
Unverified
Commit
8b0de38e
authored
Oct 17, 2018
by
Alexandre Ardhuin
Committed by
GitHub
Oct 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix upcoming lint avoid_returning_null_for_void (#23190)
parent
cab7ecb8
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
13 additions
and
18 deletions
+13
-18
run_command.dart
dev/bots/run_command.dart
+1
-1
run.dart
dev/devicelab/bin/run.dart
+2
-2
adb.dart
dev/devicelab/lib/framework/adb.dart
+0
-1
updater.dart
examples/flutter_gallery/lib/gallery/updater.dart
+1
-1
sliver_cache_test.dart
packages/flutter/test/rendering/sliver_cache_test.dart
+1
-1
slivers_block_test.dart
packages/flutter/test/rendering/slivers_block_test.dart
+1
-1
binding.dart
packages/flutter_test/lib/src/binding.dart
+0
-1
fuchsia_asset_builder.dart
packages/flutter_tools/bin/fuchsia_asset_builder.dart
+0
-1
cache.dart
packages/flutter_tools/lib/src/cache.dart
+2
-2
crash_reporting.dart
packages/flutter_tools/lib/src/crash_reporting.dart
+1
-1
devices.dart
packages/flutter_tools/lib/src/ios/devices.dart
+1
-3
run_cold.dart
packages/flutter_tools/lib/src/run_cold.dart
+1
-1
mocks.dart
packages/flutter_tools/test/src/mocks.dart
+2
-2
No files found.
dev/bots/run_command.dart
View file @
8b0de38e
...
@@ -44,7 +44,7 @@ Future<void> runCommand(String executable, List<String> arguments, {
...
@@ -44,7 +44,7 @@ Future<void> runCommand(String executable, List<String> arguments, {
final
String
relativeWorkingDir
=
path
.
relative
(
workingDirectory
);
final
String
relativeWorkingDir
=
path
.
relative
(
workingDirectory
);
if
(
skip
)
{
if
(
skip
)
{
printProgress
(
'SKIPPING'
,
relativeWorkingDir
,
commandDescription
);
printProgress
(
'SKIPPING'
,
relativeWorkingDir
,
commandDescription
);
return
null
;
return
;
}
}
printProgress
(
'RUNNING'
,
relativeWorkingDir
,
commandDescription
);
printProgress
(
'RUNNING'
,
relativeWorkingDir
,
commandDescription
);
...
...
dev/devicelab/bin/run.dart
View file @
8b0de38e
...
@@ -28,7 +28,7 @@ Future<void> main(List<String> rawArgs) async {
...
@@ -28,7 +28,7 @@ Future<void> main(List<String> rawArgs) async {
stderr
.
writeln
(
'Usage:
\n
'
);
stderr
.
writeln
(
'Usage:
\n
'
);
stderr
.
writeln
(
_argParser
.
usage
);
stderr
.
writeln
(
_argParser
.
usage
);
exitCode
=
1
;
exitCode
=
1
;
return
null
;
return
;
}
}
if
(!
args
.
wasParsed
(
'task'
))
{
if
(!
args
.
wasParsed
(
'task'
))
{
...
@@ -50,7 +50,7 @@ Future<void> main(List<String> rawArgs) async {
...
@@ -50,7 +50,7 @@ Future<void> main(List<String> rawArgs) async {
if
(
_taskNames
.
isEmpty
)
{
if
(
_taskNames
.
isEmpty
)
{
stderr
.
writeln
(
'Failed to find tasks to run based on supplied options.'
);
stderr
.
writeln
(
'Failed to find tasks to run based on supplied options.'
);
exitCode
=
1
;
exitCode
=
1
;
return
null
;
return
;
}
}
final
bool
silent
=
args
[
'silent'
];
final
bool
silent
=
args
[
'silent'
];
...
...
dev/devicelab/lib/framework/adb.dart
View file @
8b0de38e
...
@@ -407,7 +407,6 @@ class IosDeviceDiscovery implements DeviceDiscovery {
...
@@ -407,7 +407,6 @@ class IosDeviceDiscovery implements DeviceDiscovery {
@override
@override
Future
<
void
>
performPreflightTasks
()
async
{
Future
<
void
>
performPreflightTasks
()
async
{
// Currently we do not have preflight tasks for iOS.
// Currently we do not have preflight tasks for iOS.
return
null
;
}
}
}
}
...
...
examples/flutter_gallery/lib/gallery/updater.dart
View file @
8b0de38e
...
@@ -34,7 +34,7 @@ class UpdaterState extends State<Updater> {
...
@@ -34,7 +34,7 @@ class UpdaterState extends State<Updater> {
// Only prompt once a day
// Only prompt once a day
if
(
_lastUpdateCheck
!=
null
&&
if
(
_lastUpdateCheck
!=
null
&&
DateTime
.
now
().
difference
(
_lastUpdateCheck
)
<
const
Duration
(
days:
1
))
{
DateTime
.
now
().
difference
(
_lastUpdateCheck
)
<
const
Duration
(
days:
1
))
{
return
null
;
// We already checked for updates recently
return
;
// We already checked for updates recently
}
}
_lastUpdateCheck
=
DateTime
.
now
();
_lastUpdateCheck
=
DateTime
.
now
();
...
...
packages/flutter/test/rendering/sliver_cache_test.dart
View file @
8b0de38e
...
@@ -931,7 +931,7 @@ class TestRenderSliverBoxChildManager extends RenderSliverBoxChildManager {
...
@@ -931,7 +931,7 @@ class TestRenderSliverBoxChildManager extends RenderSliverBoxChildManager {
@override
@override
void
createChild
(
int
index
,
{
@required
RenderBox
after
})
{
void
createChild
(
int
index
,
{
@required
RenderBox
after
})
{
if
(
index
<
0
||
index
>=
children
.
length
)
if
(
index
<
0
||
index
>=
children
.
length
)
return
null
;
return
;
try
{
try
{
_currentlyUpdatingChildIndex
=
index
;
_currentlyUpdatingChildIndex
=
index
;
_renderObject
.
insert
(
children
[
index
],
after:
after
);
_renderObject
.
insert
(
children
[
index
],
after:
after
);
...
...
packages/flutter/test/rendering/slivers_block_test.dart
View file @
8b0de38e
...
@@ -27,7 +27,7 @@ class TestRenderSliverBoxChildManager extends RenderSliverBoxChildManager {
...
@@ -27,7 +27,7 @@ class TestRenderSliverBoxChildManager extends RenderSliverBoxChildManager {
@override
@override
void
createChild
(
int
index
,
{
@required
RenderBox
after
})
{
void
createChild
(
int
index
,
{
@required
RenderBox
after
})
{
if
(
index
<
0
||
index
>=
children
.
length
)
if
(
index
<
0
||
index
>=
children
.
length
)
return
null
;
return
;
try
{
try
{
_currentlyUpdatingChildIndex
=
index
;
_currentlyUpdatingChildIndex
=
index
;
_renderObject
.
insert
(
children
[
index
],
after:
after
);
_renderObject
.
insert
(
children
[
index
],
after:
after
);
...
...
packages/flutter_test/lib/src/binding.dart
View file @
8b0de38e
...
@@ -568,7 +568,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
...
@@ -568,7 +568,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
assert
(
inTest
);
assert
(
inTest
);
asyncBarrier
();
// When using AutomatedTestWidgetsFlutterBinding, this flushes the microtasks.
asyncBarrier
();
// When using AutomatedTestWidgetsFlutterBinding, this flushes the microtasks.
return
null
;
}
}
void
_verifyInvariants
()
{
void
_verifyInvariants
()
{
...
...
packages/flutter_tools/bin/fuchsia_asset_builder.dart
View file @
8b0de38e
...
@@ -40,7 +40,6 @@ Future<void> writeFile(libfs.File outputFile, DevFSContent content) async {
...
@@ -40,7 +40,6 @@ Future<void> writeFile(libfs.File outputFile, DevFSContent content) async {
outputFile
.
createSync
(
recursive:
true
);
outputFile
.
createSync
(
recursive:
true
);
final
List
<
int
>
data
=
await
content
.
contentsAsBytes
();
final
List
<
int
>
data
=
await
content
.
contentsAsBytes
();
outputFile
.
writeAsBytesSync
(
data
);
outputFile
.
writeAsBytesSync
(
data
);
return
null
;
}
}
Future
<
void
>
run
(
List
<
String
>
args
)
async
{
Future
<
void
>
run
(
List
<
String
>
args
)
async
{
...
...
packages/flutter_tools/lib/src/cache.dart
View file @
8b0de38e
...
@@ -72,7 +72,7 @@ class Cache {
...
@@ -72,7 +72,7 @@ class Cache {
/// calling [Cache.releaseLockEarly] once they are no longer touching the cache.
/// calling [Cache.releaseLockEarly] once they are no longer touching the cache.
static
Future
<
void
>
lock
()
async
{
static
Future
<
void
>
lock
()
async
{
if
(!
_lockEnabled
)
if
(!
_lockEnabled
)
return
null
;
return
;
assert
(
_lock
==
null
);
assert
(
_lock
==
null
);
_lock
=
await
fs
.
file
(
fs
.
path
.
join
(
flutterRoot
,
'bin'
,
'cache'
,
'lockfile'
)).
open
(
mode:
FileMode
.
write
);
_lock
=
await
fs
.
file
(
fs
.
path
.
join
(
flutterRoot
,
'bin'
,
'cache'
,
'lockfile'
)).
open
(
mode:
FileMode
.
write
);
bool
locked
=
false
;
bool
locked
=
false
;
...
@@ -201,7 +201,7 @@ class Cache {
...
@@ -201,7 +201,7 @@ class Cache {
Future
<
void
>
updateAll
()
async
{
Future
<
void
>
updateAll
()
async
{
if
(!
_lockEnabled
)
if
(!
_lockEnabled
)
return
null
;
return
;
try
{
try
{
for
(
CachedArtifact
artifact
in
_artifacts
)
{
for
(
CachedArtifact
artifact
in
_artifacts
)
{
if
(!
artifact
.
isUpToDate
())
if
(!
artifact
.
isUpToDate
())
...
...
packages/flutter_tools/lib/src/crash_reporting.dart
View file @
8b0de38e
...
@@ -87,7 +87,7 @@ class CrashReportSender {
...
@@ -87,7 +87,7 @@ class CrashReportSender {
})
async
{
})
async
{
try
{
try
{
if
(
_usage
.
suppressAnalytics
)
if
(
_usage
.
suppressAnalytics
)
return
null
;
return
;
printStatus
(
'Sending crash report to Google.'
);
printStatus
(
'Sending crash report to Google.'
);
...
...
packages/flutter_tools/lib/src/ios/devices.dart
View file @
8b0de38e
...
@@ -579,7 +579,7 @@ class _IOSDevicePortForwarder extends DevicePortForwarder {
...
@@ -579,7 +579,7 @@ class _IOSDevicePortForwarder extends DevicePortForwarder {
Future
<
void
>
unforward
(
ForwardedPort
forwardedPort
)
async
{
Future
<
void
>
unforward
(
ForwardedPort
forwardedPort
)
async
{
if
(!
_forwardedPorts
.
remove
(
forwardedPort
))
{
if
(!
_forwardedPorts
.
remove
(
forwardedPort
))
{
// Not in list. Nothing to remove.
// Not in list. Nothing to remove.
return
null
;
return
;
}
}
printTrace
(
'Unforwarding port
$forwardedPort
'
);
printTrace
(
'Unforwarding port
$forwardedPort
'
);
...
@@ -591,7 +591,5 @@ class _IOSDevicePortForwarder extends DevicePortForwarder {
...
@@ -591,7 +591,5 @@ class _IOSDevicePortForwarder extends DevicePortForwarder {
}
else
{
}
else
{
printError
(
'Forwarded port did not have a valid process'
);
printError
(
'Forwarded port did not have a valid process'
);
}
}
return
null
;
}
}
}
}
packages/flutter_tools/lib/src/run_cold.dart
View file @
8b0de38e
...
@@ -109,7 +109,7 @@ class ColdRunner extends ResidentRunner {
...
@@ -109,7 +109,7 @@ class ColdRunner extends ResidentRunner {
}
}
@override
@override
Future
<
void
>
handleTerminalCommand
(
String
code
)
async
=>
null
;
Future
<
void
>
handleTerminalCommand
(
String
code
)
async
{
}
@override
@override
Future
<
void
>
cleanupAfterSignal
()
async
{
Future
<
void
>
cleanupAfterSignal
()
async
{
...
...
packages/flutter_tools/test/src/mocks.dart
View file @
8b0de38e
...
@@ -278,10 +278,10 @@ class MemoryIOSink implements IOSink {
...
@@ -278,10 +278,10 @@ class MemoryIOSink implements IOSink {
Future
<
void
>
get
done
=>
close
();
Future
<
void
>
get
done
=>
close
();
@override
@override
Future
<
void
>
close
()
async
=>
null
;
Future
<
void
>
close
()
async
{
}
@override
@override
Future
<
void
>
flush
()
async
=>
null
;
Future
<
void
>
flush
()
async
{
}
}
}
/// A Stdio that collects stdout and supports simulated stdin.
/// A Stdio that collects stdout and supports simulated stdin.
...
...
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