|
1 | 1 | # animated_icon_button |
2 | 2 |
|
3 | | -Flutter package to create custom animated icons |
| 3 | +😊 Flutter package to create custom <strong>animated</strong> IconButton.</br> |
| 4 | +😵 <strong>Includes all available icons.</strong> Based on native IconButton. |
| 5 | + |
| 6 | +<img src="https://github.com/Frezyx/animated_icon_button/blob/master/example/rep_files/preview.gif?raw=true" width="270"> |
4 | 7 |
|
5 | 8 | ## Getting Started |
| 9 | +Follow these steps to use this library |
| 10 | + |
| 11 | +### Add dependency |
| 12 | + |
| 13 | +```yaml |
| 14 | +dependencies: |
| 15 | + animated_icon_button: ^0.1.0 #latest version |
| 16 | +``` |
| 17 | +
|
| 18 | +### Add import package |
| 19 | +
|
| 20 | +```dart |
| 21 | +import 'package:animated_icon_button/animated_icon_button.dart'; |
| 22 | +``` |
6 | 23 |
|
7 | | -This project is a starting point for a Dart |
8 | | -[package](https://flutter.dev/developing-packages/), |
9 | | -a library module containing code that can be shared easily across |
10 | | -multiple Flutter or Dart projects. |
| 24 | +### Easy to use |
| 25 | +Simple example of use AnimatedIconButton<br> |
| 26 | +Put this code in your project at an screen and learn how it works 😊 |
11 | 27 |
|
12 | | -For help getting started with Flutter, view our |
| 28 | +```dart |
| 29 | + AnimatedIconButton( |
| 30 | + size: 35, |
| 31 | + onPressed: () { |
| 32 | + print("button with color pressed"); |
| 33 | + }, |
| 34 | + duration: Duration(milliseconds: 200), |
| 35 | + endIcon: Icon( |
| 36 | + Icons.close, |
| 37 | + color: Colors.red, |
| 38 | + ), |
| 39 | + startIcon: Icon( |
| 40 | + Icons.add, |
| 41 | + color: Colors.purple, |
| 42 | + ), |
| 43 | + ) |
| 44 | +``` |
| 45 | + |
| 46 | +### Attributes |
| 47 | + |
| 48 | +<strong>size:</strong> The size of AnimatedIconButton <br> |
| 49 | +<strong>startIcon:</strong> The icon of the AnimatedIconButton when button is not pressed.<br> |
| 50 | +<strong>endIcon:</strong> The icon of the AnimatedIconButton when button is pressed. <br> |
| 51 | +<strong>duration:</strong> Animation time of the AnimatedIconButton. <br> |
| 52 | +<strong>startBackgroundColor:</strong> The background Color of the AnimatedIconButton when button is not pressed. <br> |
| 53 | +<strong>endBackgroundColor:</strong> The background Color of the AnimatedIconButton when button is pressed. <br> |
| 54 | +<strong>And all fields of the parent element:</strong> <a href="https://api.flutter.dev/flutter/material/IconButton-class.html">IconButton</a> |
| 55 | +<br><br> |
| 56 | + |
| 57 | +For help getting started with 😍 Flutter, view our |
13 | 58 | [online documentation](https://flutter.dev/docs), which offers tutorials, |
14 | 59 | samples, guidance on mobile development, and a full API reference. |
| 60 | + |
0 commit comments