avoid returning null for Future (#23784)
This commit is contained in:
committed by
GitHub
parent
202b045b50
commit
344ebe02ff
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 { }
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user