existsAsync static method
判断目录、文件是否存在
uri 资源路径
isDir 当前路径是否为文件夹
Implementation
static Future<bool> existsAsync(
String uri, {
bool isDir = false,
}) async {
final type = await FileSystemEntity.type(uri);
return type != FileSystemEntityType.notFound;
}