row method
Implementation
List<num> row(int y) {
final size = _width * _channels;
return switch (dtype) {
StbiDType.u8 => (ptr.cast<ffi.Uint8>() + y * size).asTypedList(size),
StbiDType.u16 => (ptr.cast<ffi.Uint16>() + y * size).asTypedList(size),
StbiDType.f32 => (ptr.cast<ffi.Float>() + y * size).asTypedList(size),
};
}