darkModeTileBuilder top-level property

TileBuilder darkModeTileBuilder
final

Applies inversion color matrix on Tiles which may simulate Dark mode. darkModeTilesContainerBuilder is better at performance because it applies color matrix on the container instead of on every Tile

Implementation

final TileBuilder darkModeTileBuilder =
    (BuildContext context, Widget tileWidget, Tile tile) {
  return ColorFiltered(
    colorFilter: const ColorFilter.matrix(<double>[
      -1,
      0,
      0,
      0,
      255,
      0,
      -1,
      0,
      0,
      255,
      0,
      0,
      -1,
      0,
      255,
      0,
      0,
      0,
      1,
      0,
    ]),
    child: tileWidget,
  );
};