$file static method
Instantiate a new $Image using Image.file from args
Implementation
static $Value? $file(Runtime runtime, $Value? target, List<$Value?> args) {
final file = args[0]!.$value;
runtime.assertPermission('filesystem:read', file.path);
return $Image.wrap(
Image.file(
args[0]!.$value,
key: args[1]?.$value,
scale: args[2]?.$value ?? 1.0,
width: args[3]?.$value,
height: args[4]?.$value,
color: args[5]?.$value,
fit: args[6]?.$value,
alignment: args[7]?.$value ?? Alignment.center,
filterQuality: args[8]?.$value ?? FilterQuality.low,
),
);
}