lightning_overlay 0.0.3 lightning_overlay: ^0.0.3 copied to clipboard
Create nice Overlay Effect on any of your Widgets
Lightning Overlay #
Lightning Overlay for any Widget Create nice Overlay Effect on any of your Widgets.
https://github.com/Gastrolize/lightning_overlay/assets/72274345/14377764-7d17-4f6d-a30e-bc1c0a42013a
Note #
If you want to use the Auto Start, you need to set delayDuration
. Also you need to set a pauseDuration
for the reverse animation. If the reverse animation not starts, you need to increase the pauseDuration
.
Modes #
It supports following modes:
- Auto Start with Delay
- Controlled by the Lightning Controller
- Gesture
Also it supports following directions:
- Left Up Corner to Right Bottom Corner
- Right Bottom Corner to Left Up Corner
API #
Property | Description | Required | Optional |
---|---|---|---|
maxValue | It depends on the size your child widget. Choose the bigger number. If width=200 and height=300 choose 300. | Yes |
No |
child | Passing your child widget | Yes |
No |
delayDuration | When passing delayDuration, the animation will autostart and wait until delayed duration is finished | No | Yes |
useGesture | Deciding wether the user can press on it to start the animation and when tap up it finishes the animation | No | No |
borderRadius | If your child widget uses border radius, pass it the double to the Lightning to hide edges on animation | No | No |
controller | To trigger the animation (ex. when clicking on a button) | No | Yes |
overlayColor | Styling the overlay color | No | No |
pauseDuration | When clicking or firing the animation, there can be set a pause Duration between when the overlay fully covered the child and starts to uncover the child | No | No |
durationIn | Duration for the covering animation | No | No |
durationOut | Duration for the uncovering animation | No | No |
curveIn | Curve for the covering animation | No | No |
curveOut | Curve for the uncovering animation | No | No |
direction | Wether the animation goes from left top to right bottom or reverse | No | No |
Controller #
Create a Controller and pass it to the Lightning Widget:
LightningController controller = LightningController();
Function | Description |
---|---|
animate | Triggers the overlay animation |