coordinateDebugTileBuilder top-level property

TileBuilder coordinateDebugTileBuilder
final

Shows coordinates over Tiles

Implementation

final TileBuilder coordinateDebugTileBuilder =
    (BuildContext context, Widget tileWidget, Tile tile) {
  final coords = tile.coords;
  final readableKey =
      '${coords.x.floor()} : ${coords.y.floor()} : ${coords.z.floor()}';

  return Container(
    decoration: BoxDecoration(
      border: Border.all(),
    ),
    child: Stack(
      fit: StackFit.passthrough,
      children: [
        tileWidget,
        Center(
          child: Text(
            readableKey,
            style: Theme.of(context).textTheme.headline5,
          ),
        ),
      ],
    ),
  );
};