getTile method

Future<Uint8List?> getTile(
  1. String source,
  2. int z,
  3. int x,
  4. int y,
)

Implementation

Future<Uint8List?> getTile(String source, int z, int x, int y) async {
  final tile = await (select(tiles)
        ..where((t) =>
            t.source.equals(source) &
            t.z.equals(z) &
            t.x.equals(x) &
            t.y.equals(y)))
      .getSingleOrNull();

  return tile?.bytes;
}