@@ -339,14 +339,16 @@ class DevFS {
|
||||
Uri get baseUri => _baseUri;
|
||||
|
||||
Future<Uri> create() async {
|
||||
printTrace('DevFS: Creating new filesystem on the device ($_baseUri)');
|
||||
_baseUri = await _operations.create(fsName);
|
||||
printTrace('DevFS: Created new filesystem on the device ($_baseUri)');
|
||||
return _baseUri;
|
||||
}
|
||||
|
||||
Future<dynamic> destroy() {
|
||||
Future<Null> destroy() async {
|
||||
printTrace('DevFS: Deleting filesystem on the device ($_baseUri)');
|
||||
await _operations.destroy(fsName);
|
||||
printTrace('DevFS: Deleted filesystem on the device ($_baseUri)');
|
||||
return _operations.destroy(fsName);
|
||||
}
|
||||
|
||||
/// Update files on the device and return the number of bytes sync'd
|
||||
|
||||
@@ -226,7 +226,19 @@ abstract class ResidentRunner {
|
||||
throwToolExit('No Flutter view is available');
|
||||
|
||||
// Listen for service protocol connection to close.
|
||||
vmService.done.whenComplete(appFinished);
|
||||
vmService.done.then<Null>(
|
||||
_serviceProtocolDone,
|
||||
onError: _serviceProtocolError).whenComplete(appFinished);
|
||||
}
|
||||
|
||||
Future<Null> _serviceProtocolDone(dynamic object) {
|
||||
printTrace('Service protocol connection closed.');
|
||||
return new Future<Null>.value(object);
|
||||
}
|
||||
|
||||
Future<Null> _serviceProtocolError(dynamic error, StackTrace stack) {
|
||||
printTrace('Service protocol connection closed with an error: $error\n$stack');
|
||||
return new Future<Null>.error(error, stack);
|
||||
}
|
||||
|
||||
/// Returns [true] if the input has been handled by this function.
|
||||
|
||||
Reference in New Issue
Block a user