Search packages, repositories and app categories

icons_animate cover
Package detailsv0.0.2

icons_animate

Use this package to animate between two static Icons and get an Animated Icon.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
140
Likes
27
Pub points
145

Install package

flutter pub add icons_animate

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The icons_animate package enables developers to create smooth animations between two static icons in Flutter applications. By using the AnimatedIcon widget, users can transition seamlessly from one icon to another, enhancing user interface interactivity. It supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux, making it highly versatile for cross-platform development. The package is lightweight and integrates easily with existing Flutter projects via a simple pub add command.

Use cases

  • Animated icon transitions in buttons
  • Interactive UI elements
  • Loading state indicators
  • Toggle animations
  • Visual feedback for actions

Key features

  • Smooth icon-to-icon animation
  • Cross-platform support
  • Simple integration with Flutter
  • Customizable animation duration
  • Built-in icon pairs

Suitable for

  • UI designers seeking dynamic visuals
  • Developers building interactive apps
  • Projects requiring subtle animations
  • Cross-platform mobile and web apps
  • Enhancing user experience with micro-interactions

Considerations

  • Limited to predefined icon pairs
  • Requires careful performance tuning on low-end devices
  • Animation complexity may affect responsiveness
  • Not suitable for complex custom animations
  • Depends on Flutter's animation framework stability

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Icons Animate

This is a Flutter package to make a custom AnimatedIcon from two Icons.
This package is born to make AnimatedIcons easily available for any Icon and not only the few default ones

GitHub branch checks state GitHub release (latest by date)
Pub Version Pub Points
GitHub license GitHub last commit GitHub issues GitHub closed issues

Features

Here are some examples of animated icons.

Note that you can provide any Icon that is of type IconData to the animator

example gif

You can see an example of some icons being animated in the Sample Project

Getting started

To install the package just do:

flutter pub add icons_animate
flutter pub get

OR add the dependency manually to your pubspec.yaml file:

dependencies:
  icons_animate: ^0.0.2

Then depend on it in your class:

import 'package:icons_animate/icons_animate.dart';

Usage

Here is a simple implementation:

AnimateIcons(
    startIcon: Icons.add_circle,
    endIcon: Icons.add_circle_outline,
    size: 100.0,
    controller: controller,
    startTooltip: 'Icons.add_circle',
    endTooltip: 'Icons.add_circle_outline',
    // add this for splashColor, default is Colors.transparent means no click effect
    splashColor: Colors.blueAccent.shade100.withAlpha(50),
    // add this to specify a custom splashRadius
    // default is Material.defaultSplashRadius (35)
    splashRadius: 24,
    onStartIconPress: () {
        print("Clicked on Add Icon");
        return true;
    },
    onEndIconPress: () {
        print("Clicked on Close Icon");
        return true;
    },
    duration: Duration(milliseconds: 500),
    startIconColor: Colors.deepPurple,
    endIconColor: Colors.deepOrange,
    clockwise: false,
),

See Example Code for more info.

Issues & Feedback

Please file an issue to send feedback or report a bug, If you want to ask a question or suggest an idea then you can open an discussion. Thank you!

Contributing

Every PR is welcome.

Categories

Source repository

Projects using this package

No data available yet.