getPath method

  1. @protected
String getPath (
  1. dynamic path
)
@protected

Gets the string path represented by the specified generic path.

path may be a io.FileSystemEntity, a String, or a Uri.

Implementation

@protected
String getPath(dynamic path) {
  if (path is io.FileSystemEntity) {
    return path.path;
  } else if (path is String) {
    return path;
  } else if (path is Uri) {
    return this.path.fromUri(path);
  } else {
    throw ArgumentError('Invalid type for "path": ${path?.runtimeType}');
  }
}