RatelHub / rflutter_alert

RFlutter Alert is super customizable and easy-to-use alert / popup dialog library for Flutter. You may create reusable alert styles or add buttons as much as you want with ease.
https://ratel.com.tr
MIT License
386 stars 117 forks source link

Please add background opacity option #18

Closed Stef-GMS closed 5 years ago

Stef-GMS commented 5 years ago

I love the rflutter_alert package, but would like to have an option to change the background opacity. As you can see from the attached, the black background is covering the contents beneath so much one cannot see it. Having a way to change the opacity would help with this. It would give the developer the ability to change it so that it either blocks or shows the contents beneath.

Opacity setting please
Stef-GMS commented 5 years ago

Never mind. I found this works. overlayColor: Colors.black12,

frey1esm commented 5 years ago

@Stef-GMS how is overlayColor used exactly?

Stef-GMS commented 5 years ago

overlayColor is added to the AlertStyle. Below is a code snippet and I'm attaching screenshot examples. Alert( context: context, type: AlertType.success, style: AlertStyle( animationType: AnimationType.grow, isCloseButton: false, isOverlayTapDismiss: false, overlayColor: Colors.black45, //no number is solid; higher number (ex. black87) more opaque background ),

FlutterTraining-Alert-AlertStyle-OverlayOpacity-1

FlutterTraining-Alert-AlertStyle-OverlayOpacity-2FlutterTraining-Alert-AlertStyle-OverlayOpacity-3 FlutterTraining-Alert-AlertStyle-OverlayOpacity-4FlutterTraining-Alert-AlertStyle-OverlayOpacity-5