push_in_out_switcher 1.0.0+1 push_in_out_switcher: ^1.0.0+1 copied to clipboard
An animated switcher with the push-in-out animation.
push_in_out_switcher #
🔄 An animated switcher with the push-in-out animation.
How to use #
Install the package #
Add the dependency to pubspec.yaml:
dependencies:
push_in_out_switcher: ^1.0.0+1
Use it! #
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. |