Below the modified code sample for gray scale tiles (hard coded). Could also be used for visual enhancements (contrast, night vision, ...).
return ColorFiltered(
colorFilter: ColorFilter.matrix(<double>[
0.2126,0.7152,0.0722,0,0,
0.2126,0.7152,0.0722,0,0,
0.2126,0.7152,0.0722,0,0,
0,0,0,1,0,
]),
child: Opacity(
opacity: options.opacity,
child: Container(
color: options.backgroundColor,
child: Stack(
children: tileWidgets,
),
),
),
);
}
Edit: posted wrong code, now with child.
Not sure if this is the best place to do the filtering performance wise. Please comment.
Hello, I suggest a small update to
TileLayerOptionswith an optional parameter for a ColorFilter.matrix to post process the tiles. Widget ColorFiltered.Below the modified code sample for gray scale tiles (hard coded). Could also be used for visual enhancements (contrast, night vision, ...).
Edit: posted wrong code, now with child.
Not sure if this is the best place to do the filtering performance wise. Please comment.