auto_animated_icon 1.1.4

  • Readme
  • Changelog
  • Installing
  • 66

auto_animated_icon #

A Flutter package to simplify the process of creating an AnimatedIcon

Getting Started #

The AutoAnimatedIcon will help you create an AnimatedIcon without any hussle. Just create an AutoAnimatedIcon widget with the icon which is one of the AnimatedIcons and an onPressed method to do the things you want to do when its pressed.

There is an iconState property which can be set to either IconState.first or IconState.second to specify the icon's state.

Usage #

Basic #

class MenuCloseIcon extends StatefulWidget {
	const MenuCloseIcon({
		Key key,
	}) : super(key: key);

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

class _MenuCloseIconState extends State<MenuCloseIcon> {

	IconState _iconState = IconState.first;

	bool _isPressed = false;

	@override
	Widget build(BuildContext context) {
		return AutoAnimatedIcon(
		iconState: _iconState,
		icon: AnimatedIcons.menu_close,
		onPressed: () {
			setState(() {
			_isPressed = !_isPressed;
			if(_isPressed)
				_iconState  = IconState.second;
			else
				_iconState = IconState.first;
			});
			log("checking");
		},
		);
	}
}

With separate toolips #

   AutoAnimatedIcon(
	  icon: AnimatedIcons.event_add,
	  onPressed: () {},
	  firstToolip: "Event",
	  secondToolip: "Add",
   );

In this example the widget will show the firstToolip for the first icon and the secondToolip for second icon.

For Further Customization #

For more customization options consider IconButton's and AnimatedIcon's properties which are directly available to use in AutoAnimatedIcon.

Examples #

Counter Which shows AutoAnimatedIcons on the AppBar.

Feel free to let me know of any issues or suggestions.

Contributions #

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.

If you fixed a bug or implemented a new feature, please send a pull request.

Maintainers #

Arjunraj Kokkadan

For help getting started with Flutter, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[1.1.4] - 28-08-2019.

  • Fixed a small bug.

[1.1.3] - 14-08-2019.

  • Fixed a terrible bug.

[1.1.2] - 13-08-2019.

  • Updated Readme and example.

[1.1.1] - 13-08-2019.

  • Updated Readme and example.

[1.1.0] - 13-08-2019.

  • Updated to have iconState. chaning the iconState and calling setState() will animate the icon.

[1.0.8] - 21-07-2019.

  • Modified example to have the latest dependencies.

[1.0.7] - 21-07-2019.

  • Really Fixed a bug which prevented transition while tapped for the first time after its built.

[1.0.6] - 21-07-2019.

  • Code formatted.

[1.0.5] - 21-07-2019.

  • Bug Fix.

[1.0.4] - 21-07-2019.

  • Fixed a bug which prevented transition while tapped for the first time after its built.

[1.0.3] - 21-07-2019.

  • Added separate toolip(firstToolip & secondToolip) for both icons. And the toolip Example.

[1.0.2] - 20-07-2019.

  • Modified the example to match the known example patterns.

[1.0.1] - 20-07-2019.

  • Added an example counter app with a leading and action AutoAnimatedButton on the appbar

[1.0.0] - 19-07-2019.

  • The initial release include the features which are essential to build the AnimatedIcon as simple as possible.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  auto_animated_icon: ^1.1.4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:auto_animated_icon/auto_animated_icon.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
35
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
66
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance issues and suggestions

Homepage URL isn't helpful. (-10 points)

Update the homepage field from pubspec.yaml: link to a website about the package or use the source repository URL.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and auto_animated_icon.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test