FLUTTER ECOSYSTEM

ericdallo/ripple_effect

अपने ऐप में रिपल प्रभाव जोड़ने के लिए एक Flutter pub पैकेज

रिपल प्रभाव प्रोजेक्ट कवर
Stars
11
Forks
8
अंतिम पुश (UTC)
15 दिस॰ 2022
प्रोजेक्ट स्थिति
सक्रिय
Eric Dallo GitHub avatar
GITHUB User

Eric Dallo ↗

Emacs fanatic, NixOS enthusiast, maintainer of clojure-lsp, ECA, emacs-lsp and lsp-dart

भाषाएँDart

तकनीकी विषय

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 3 आइटम
  • flutter{"sdk":"flutter"}
  • rect_getter^0.1.0
  • flutter_testडेवलपमेंट{"sdk":"flutter"}

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

Pub Package GitHub Actions

ripple_effect

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

https://user-images.githubusercontent.com/7820865/78139282-a2e49c00-73fe-11ea-9159-7ea019c87d0e.gif

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),
          ),
        )
      ),
    );
  }
}