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
344ebe02
Unverified
Commit
344ebe02
authored
Nov 05, 2018
by
Alexandre Ardhuin
Committed by
GitHub
Nov 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid returning null for Future (#23784)
parent
202b045b
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
16 additions
and
16 deletions
+16
-16
utils.dart
dev/devicelab/lib/framework/utils.dart
+1
-1
example_code_parser_test.dart
examples/flutter_gallery/test/example_code_parser_test.dart
+3
-3
image_resolution.dart
packages/flutter/lib/src/painting/image_resolution.dart
+1
-1
binding.dart
packages/flutter/lib/src/scheduler/binding.dart
+1
-1
image_resolution_test.dart
packages/flutter/test/widgets/image_resolution_test.dart
+1
-1
binding.dart
packages/flutter_test/lib/src/binding.dart
+1
-1
config.dart
packages/flutter_tools/lib/src/commands/config.dart
+1
-1
shell_completion.dart
...ages/flutter_tools/lib/src/commands/shell_completion.dart
+1
-1
flutter_tester.dart
packages/flutter_tools/lib/src/tester/flutter_tester.dart
+1
-1
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+1
-1
pub_get_test.dart
packages/flutter_tools/test/dart/pub_get_test.dart
+1
-1
resident_runner_test.dart
packages/flutter_tools/test/resident_runner_test.dart
+3
-3
No files found.
dev/devicelab/lib/framework/utils.dart
View file @
344ebe02
...
...
@@ -169,7 +169,7 @@ Future<String> getDartVersion() async {
Future
<
String
>
getCurrentFlutterRepoCommit
()
{
if
(!
dir
(
'
${flutterDirectory.path}
/.git'
).
existsSync
())
{
return
null
;
return
Future
<
String
>.
value
(
null
)
;
}
return
inDirectory
<
String
>(
flutterDirectory
,
()
{
...
...
examples/flutter_gallery/test/example_code_parser_test.dart
View file @
344ebe02
...
...
@@ -41,12 +41,12 @@ test 1 1
class
TestAssetBundle
extends
AssetBundle
{
@override
Future
<
ByteData
>
load
(
String
key
)
=>
null
;
Future
<
ByteData
>
load
(
String
key
)
async
=>
null
;
@override
Future
<
String
>
loadString
(
String
key
,
{
bool
cache
=
true
})
{
Future
<
String
>
loadString
(
String
key
,
{
bool
cache
=
true
})
async
{
if
(
key
==
'lib/gallery/example_code.dart'
)
return
Future
<
String
>.
value
(
testCodeFile
)
;
return
testCodeFile
;
return
null
;
}
...
...
packages/flutter/lib/src/painting/image_resolution.dart
View file @
344ebe02
...
...
@@ -217,7 +217,7 @@ class AssetImage extends AssetBundleImageProvider {
static
Future
<
Map
<
String
,
List
<
String
>>>
_manifestParser
(
String
jsonData
)
{
if
(
jsonData
==
null
)
return
null
;
return
SynchronousFuture
<
Map
<
String
,
List
<
String
>>>(
null
)
;
// TODO(ianh): JSON decoding really shouldn't be on the main thread.
final
Map
<
String
,
dynamic
>
parsedJson
=
json
.
decode
(
jsonData
);
final
Iterable
<
String
>
keys
=
parsedJson
.
keys
;
...
...
packages/flutter/lib/src/scheduler/binding.dart
View file @
344ebe02
...
...
@@ -250,7 +250,7 @@ mixin SchedulerBinding on BindingBase, ServicesBinding {
}
}
Future
<
String
>
_handleLifecycleMessage
(
String
message
)
{
Future
<
String
>
_handleLifecycleMessage
(
String
message
)
async
{
handleAppLifecycleStateChanged
(
_parseAppLifecycleMessage
(
message
));
return
null
;
}
...
...
packages/flutter/test/widgets/image_resolution_test.dart
View file @
344ebe02
...
...
@@ -86,7 +86,7 @@ class TestAssetBundle extends CachingAssetBundle {
Future
<
String
>
loadString
(
String
key
,
{
bool
cache
=
true
})
{
if
(
key
==
'AssetManifest.json'
)
return
SynchronousFuture
<
String
>(
manifest
);
return
null
;
return
SynchronousFuture
<
String
>(
null
)
;
}
@override
...
...
packages/flutter_test/lib/src/binding.dart
View file @
344ebe02
...
...
@@ -1600,7 +1600,7 @@ class _MockHttpRequest extends HttpClientRequest {
List
<
Cookie
>
get
cookies
=>
null
;
@override
Future
<
HttpClientResponse
>
get
done
=>
null
;
Future
<
HttpClientResponse
>
get
done
async
=>
null
;
@override
Future
<
void
>
flush
()
{
...
...
packages/flutter_tools/lib/src/commands/config.dart
View file @
344ebe02
...
...
@@ -59,7 +59,7 @@ class ConfigCommand extends FlutterCommand {
/// Return null to disable analytics recording of the `config` command.
@override
Future
<
String
>
get
usagePath
=>
null
;
Future
<
String
>
get
usagePath
async
=>
null
;
@override
Future
<
FlutterCommandResult
>
runCommand
()
async
{
...
...
packages/flutter_tools/lib/src/commands/shell_completion.dart
View file @
344ebe02
...
...
@@ -39,7 +39,7 @@ class ShellCompletionCommand extends FlutterCommand {
/// Return null to disable analytics recording of the `bash-completion` command.
@override
Future
<
String
>
get
usagePath
=>
null
;
Future
<
String
>
get
usagePath
async
=>
null
;
@override
Future
<
FlutterCommandResult
>
runCommand
()
async
{
...
...
packages/flutter_tools/lib/src/tester/flutter_tester.dart
View file @
344ebe02
...
...
@@ -245,5 +245,5 @@ class _NoopPortForwarder extends DevicePortForwarder {
List
<
ForwardedPort
>
get
forwardedPorts
=>
<
ForwardedPort
>[];
@override
Future
<
void
>
unforward
(
ForwardedPort
forwardedPort
)
=>
null
;
Future
<
void
>
unforward
(
ForwardedPort
forwardedPort
)
async
{
}
}
packages/flutter_tools/lib/src/vmservice.dart
View file @
344ebe02
...
...
@@ -951,7 +951,7 @@ class VM extends ServiceObjectOwner {
Future
<
void
>
refreshViews
()
{
if
(!
isFlutterEngine
)
return
null
;
return
Future
<
void
>.
value
()
;
_viewCache
.
clear
();
// Send one per-application request that refreshes all views in the app.
return
vmService
.
vm
.
invokeRpc
<
ServiceObject
>(
'_flutter.listViews'
,
timeout:
kLongRequestTimeout
);
...
...
packages/flutter_tools/test/dart/pub_get_test.dart
View file @
344ebe02
...
...
@@ -213,7 +213,7 @@ class MockStreamSubscription<T> implements StreamSubscription<T> {
Future
<
E
>
asFuture
<
E
>([
E
futureValue
])
=>
Future
<
E
>.
value
();
@override
Future
<
void
>
cancel
()
=>
null
;
Future
<
void
>
cancel
()
async
{
}
@override
dynamic
noSuchMethod
(
Invocation
invocation
)
=>
null
;
...
...
packages/flutter_tools/test/resident_runner_test.dart
View file @
344ebe02
...
...
@@ -18,10 +18,10 @@ class TestRunner extends ResidentRunner {
String
receivedCommand
;
@override
Future
<
void
>
cleanupAfterSignal
()
=>
null
;
Future
<
void
>
cleanupAfterSignal
()
async
{
}
@override
Future
<
void
>
cleanupAtFinish
()
=>
null
;
Future
<
void
>
cleanupAtFinish
()
async
{
}
@override
Future
<
void
>
handleTerminalCommand
(
String
code
)
async
{
...
...
@@ -39,7 +39,7 @@ class TestRunner extends ResidentRunner {
Completer
<
void
>
appStartedCompleter
,
String
route
,
bool
shouldBuild
=
true
,
})
=>
null
;
})
async
=>
null
;
}
void
main
(
)
{
...
...
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