cool_animations 0.0.3 copy "cool_animations: ^0.0.3" to clipboard
cool_animations: ^0.0.3 copied to clipboard

Flutter package for cool animations like favourite button, like button etc.

Cool Animations #

pub package GitHub Stars Platform

A simple, colorful and fluid animations built with flutter

Maintainer : Tanmoy Karmakar

Specs #

This library allows you easily implement animated icons with amazing curves.

It has been written 100% in Dart. ❤️

Example


Installing #

Add the following to your pubspec.yaml file:

dependencies:
   cool_animations: ^0.0.3

Sample code #

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

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Material App',
      home: Homepage(),
    );
  }
}

class Homepage extends StatefulWidget {
  const Homepage({Key? key}) : super(key: key);

  @override
  _HomepageState createState() => _HomepageState();
}

class _HomepageState extends State<Homepage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Cool animations'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            BounceWidget(
              onTap: (val) {
                // ignore: avoid_print
                print(val);
              },
            ),
            RotateWidget(
              onTap: (val) {
                // ignore: avoid_print
                print(val);
              },
              inactiveIcon: Icons.hourglass_empty_rounded,
              activeIcon: Icons.hourglass_full_rounded,
              activeColor: Colors.blue,
            ),
          ],
        ),
      ),
    );
  }
}



Simple Usage #

To integrate the simple bottom navigation bar just implement it with the following code

Custom Usage #

There are several options that allow for more control:

Properties Description
inavtiveColor color of the icon when inactive
activeColor color of the icon when active
inactiveSize Size of the icon when inactive
activeSize Size of the icon when active
curve Curved followed by the icon during animation
duration Duration of the icon during animation
activeIcon icon when active
inactiveIcon icon when inactive
onTap function called when the icon is tapped

5
likes
130
pub points
28%
popularity

Publisher

unverified uploader

Flutter package for cool animations like favourite button, like button etc.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on cool_animations