ripple_animation 0.0.1 copy "ripple_animation: ^0.0.1" to clipboard
ripple_animation: ^0.0.1 copied to clipboard

outdated

Simple and highly customizable ripple animation for any flutter app!

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:ripple_animation/ripple_animation.dart';

void main() {
  runApp(
    MaterialApp(
      home: TempScreen(),
    ),
  );
}

class TempScreen extends StatefulWidget {
  @override
  _TempScreenState createState() => _TempScreenState();
}

class _TempScreenState extends State<TempScreen> {
  Key _key;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: Stack(
          children: [
            Container(
              width: MediaQuery.of(context).size.width,
              height: MediaQuery.of(context).size.height,
            ),
            Center(
              child: ElevatedButton(
                child: Text(
                  'Reply',
                ),
                style: ElevatedButton.styleFrom(
                  primary: Colors.lightBlue, // background
                ),
                onPressed: () {
                  setState(() {
                    _key = UniqueKey();
                  });
                },
              ),
            ),
            Positioned(
              bottom: -25,
              left: 0,
              right: 0,
              child: Center(
                child: RippleAnimation(
                    repeat: false,
                    key: _key,
                    color: Colors.blue,
                    minRadius: 100,
                    ripplesCount: 6,
                    child: Container()
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
31
likes
40
pub points
81%
popularity

Publisher

unverified uploader

Simple and highly customizable ripple animation for any flutter app!

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on ripple_animation