resolveAssetImport static method

String? resolveAssetImport(
  1. String? path
)

Implementation

static String? resolveAssetImport(String? path) {
  if (path == null) {
    return null;
  }
  var fileUri = Uri.parse(path);
  if (fileUri.scheme == "asset") {
    return "/${fileUri.path}";
  }
  return path;
}