Barcode2DMatrix.fromXY constructor
Create a 2d barcode matrix from a function callback
Implementation
factory Barcode2DMatrix.fromXY(
int width,
int height,
double ratio,
bool Function(int x, int y) isDark,
) =>
Barcode2DMatrix(
width,
height,
ratio,
Iterable<bool>.generate(width * height, (p) {
final x = p % height;
final y = p ~/ height;
return isDark(y, x);
}));