push_in_out_switcher pub version

🔄 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

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.