renameTo function

Future<DocumentFile?> renameTo(
  1. Uri uri,
  2. String displayName
)

Rename the current document uri to a new displayName.

Note: after using this method uri is not longer valid, use the returned document instead.

Returns the updated document.

Equivalent to DocumentFile.renameTo.

Refer to details.

Implementation

Future<DocumentFile?> renameTo(Uri uri, String displayName) async =>
    invokeMapMethod(
      'renameTo',
      <String, String>{'uri': '$uri', 'displayName': displayName},
    );