OverlayPainter constructor
OverlayPainter({
- required double padding,
- required Animation<
double> animation, - required BuildContext context,
- List<
WidgetData> ? widgetsData, - Color? bgColor,
Implementation
OverlayPainter({
required this.padding,
required this.animation,
required this.context,
this.widgetsData,
Color? bgColor,
}) : this.bgColor = bgColor ?? colorBlack,
super(repaint: animation) {
if (widgetsData!.isNotEmpty) {
widgetsData!.forEach((widgetData) {
if (!widgetData.isEnabled) {
final GlobalKey key = widgetData.key;
if (key.currentWidget == null) {
//throw new Exception("GlobalKey is not assigned to a Widget!");
} else {
areas.add(HoleArea.getHoleArea(
key: key,
padding: widgetData.padding,
shape: widgetData.shape));
}
}
});
}
}