Closed punkeroso closed 10 months ago
In version 2.3.0, Opacity
widgets were used.
However, in the latest version,
the use of the Opacity
widget has been replaced with the ColoredBox
widget.
ColoredBox(
color: widget.overlayColor ?? LoaderOverlay.defaultOverlayColor,
// ...
),
LoaderOverlay.defaultOverlayColor = Colors.grey
Therefore, to achieve transparency, you should utilize a color that includes the desired level of opacity.
LoaderOverlay(
overlayColor : Colors.grey.withOpacity(0.4),
// ...
),
related pr
To get around this you can use: overlayColor: Colors.black.withOpacity(0.4),
I guess need update documentation and close the ticket
I had the same problem and was about to give up using this library. Better update the documentation.
BTW, the overlayOpacity
property in the GlobalLoaderOverlay
don't do anything. You can set it to 1 or 0 and it dosn't do the difference.
the complete solution for me was:
GlobalLoaderOverlay(
overlayColor: Colors.transparent,//completely ignored the default color
useDefaultLoading: false,
overlayWidget: BackdropFilter(//set up my own effect, it can also be the container with the color with opacity (but for that the 'overlayColor' is already used)
filter: ImageFilter.blur(
sigmaX: 3,
sigmaY: 3,
),
child: const Center(
child: CircularProgressIndicator(),
),
),
child: appWidget,
)
Hope this can help someone
Hi, I'm using the latest version (2.3.1) and showing the overlay makes the whole content disappear (i.e. the overlay is not transparent), except the loader obviously.
Here's a demo I just wrote:
Flutter doctor:
I guess something has changed in latest flutter versions; same behavior on both iOS and Android.
Could you please help me? Let me know if you need some more info