ripple_effect 0.1.1 icon indicating copy to clipboard operation
ripple_effect: ^0.1.1 copied to clipboard

An easy way to start a ripple effect from any widget to the entire screen on your flutter app.

Pub Package

ripple_effect #

A easy way to achieve a ripple effect on you flutter app.

Usage #

First you need to wrap your page/Scaffold with the RipplePage widget, the ripple efect will growth until this widget. Then wrap with the RippleEffect where the animation should begin. When the animation should begin, call the RippleEffect.start method passing you callback method(often navigate to other page).

The RipplePage and RippleEffect widgets need their GlobalKeys respectively to work.

Example #

class Stateless extends StatelessWidget {
  final pageKey = RipplePage.createGlobalKey();
  final effectKey = RippleEffect.createGlobalKey();
  
  @override
  Widget build(BuildContext context) {
    return RipplePage(
      child: Scaffold(
        body: Center(),
        floatingActionButton: RippleEffect(
          pageKey: pageKey,
          effectKey: effectKey,
          color: Colors.blue,
          child: FloatingActionButton(
            backgroundColor: Colors.blue,
            onPressed: () =>
                 RippleEffect.start(effectKey, () => toNextPage(context)),
            child: Icon(Icons.arrow_back),
          ),
        )
      ),
    );
  }
}
30
likes
100
pub points
71%
popularity

Publisher

verified publisher iconericdallo.dev

An easy way to start a ripple effect from any widget to the entire screen on your flutter app.

Homepage

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter, rect_getter

More

Packages that depend on ripple_effect