Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nivisi/push_in_out_switcher

🔄 An animated switcher with the push-in-out animation.
https://github.com/nivisi/push_in_out_switcher

animation dart dart-package dartlang flutter flutter-package package smooth transition

Last synced: 16 days ago
JSON representation

🔄 An animated switcher with the push-in-out animation.

Awesome Lists containing this project

README

        

# push_in_out_switcher [![pub version][pub-version-img]][pub-version-url]

🔄 An animated switcher with the push-in-out animation.

Example

## How to use

### Install the package

Add the dependency to **pubspec.yaml**:

```
dependencies:
push_in_out_switcher: ^1.0.0+1
```

### Use it!

```dart
Widget build(BuildContext context) {
final icon = isPasswordVisible = isPasswordVisible
? Icons.visibility_off
: Icons.visibility;

return PushInOutSwitcher(
child: Icon(
icon,
key: ValueKey(icon),
),
);
}
```

### Optional params

| Param | Default | What's this |
| :------- | :--------------------------- | :----------------- |
| duration | Duration(milliseconds: 250) | Animation duration |
| curve | Curves.easeInOut | Animation curve |
| fade | true | Whether to use fading aimation along with scaling animation. |

[pub-version-img]: https://img.shields.io/badge/pub-v1.0.0+1-0175c2?logo=flutter
[pub-version-url]: https://pub.dev/packages/push_in_out_switcher