getPath method
- @protected
@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 new ArgumentError('Invalid type for "path": ${path?.runtimeType}');
}
}