zeba_academy_scale 0.0.1 copy "zeba_academy_scale: ^0.0.1" to clipboard
zeba_academy_scale: ^0.0.1 copied to clipboard

A lightweight Flutter package for scale, pulse, and hover scale animations.

Zeba Academy Scale #

A lightweight and flexible Flutter package for creating smooth scale animations, pulse animations, and hover scale effects with minimal code.

Build interactive and engaging Flutter interfaces with reusable animation widgets designed for buttons, cards, icons, badges, product tiles, dashboards, and more.


โœจ Features #

  • ๐ŸŽฏ Simple scale animations
  • ๐Ÿ’“ Continuous pulse animations
  • ๐Ÿ–ฑ๏ธ Hover scale effects for web and desktop
  • ๐ŸŽฎ Programmatic animation control
  • โšก Lightweight and dependency-free
  • ๐ŸŽจ Custom animation duration
  • ๐ŸŒŠ Custom animation curves
  • ๐Ÿ“ฑ Works across Flutter-supported platforms
  • ๐Ÿงฉ Reusable animation widgets
  • ๐Ÿ”ง Enable or disable animations when needed
  • ๐Ÿงช Tested with Flutter widget tests
  • ๐Ÿ“ฆ No external dependencies

๐Ÿ“ฆ Installation #

Add zeba_academy_scale to your pubspec.yaml:

dependencies:
  zeba_academy_scale: ^0.0.1

Then run:

flutter pub get

๐Ÿš€ Getting Started #

Import the package:

import 'package:zeba_academy_scale/zeba_academy_scale.dart';

๐ŸŽฏ ZebaScale #

ZebaScale creates a smooth scale effect when a user presses a widget.

It is perfect for:

  • Buttons
  • Cards
  • Icons
  • Product items
  • Interactive containers
  • Custom clickable widgets

Basic Usage #

ZebaScale(
  child: Container(
    padding: const EdgeInsets.all(20),
    color: Colors.blue,
    child: const Text(
      'Tap Me',
      style: TextStyle(
        color: Colors.white,
      ),
    ),
  ),
)

๐ŸŽจ Scale Animation with onTap #

ZebaScale(
  onTap: () {
    debugPrint('Widget tapped');
  },
  child: Container(
    padding: const EdgeInsets.symmetric(
      horizontal: 24,
      vertical: 16,
    ),
    decoration: BoxDecoration(
      color: Colors.deepPurple,
      borderRadius: BorderRadius.circular(12),
    ),
    child: const Text(
      'Tap Me',
      style: TextStyle(
        color: Colors.white,
        fontSize: 18,
      ),
    ),
  ),
)

โš™๏ธ Customize Scale Values #

ZebaScale(
  scale: 1.0,
  pressedScale: 0.90,
  duration: const Duration(
    milliseconds: 200,
  ),
  curve: Curves.easeOut,
  child: const Icon(
    Icons.favorite,
    size: 50,
  ),
)

Available Properties #

Property Description
child Widget displayed inside the animation
scale Normal scale value
pressedScale Scale value while pressed
duration Animation duration
curve Animation curve
onTap Tap callback
enabled Enables or disables animation
controller Optional animation controller

๐ŸŽฎ Programmatic Scale Control #

Use ZebaScaleController to control the animation from outside the widget.

Create a Controller #

final controller = ZebaScaleController();

Use it with ZebaScale:

ZebaScale(
  controller: controller,
  child: const Text(
    'Controlled Widget',
  ),
)

Control the animation:

controller.scaleUp();
controller.scaleDown();
controller.toggle();

Complete Controller Example #

class ScaleExample extends StatefulWidget {
  const ScaleExample({super.key});

  @override
  State<ScaleExample> createState() => _ScaleExampleState();
}

class _ScaleExampleState extends State<ScaleExample> {
  final controller = ZebaScaleController();

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        ZebaScale(
          controller: controller,
          child: Container(
            padding: const EdgeInsets.all(24),
            color: Colors.blue,
            child: const Text(
              'Controlled Widget',
              style: TextStyle(
                color: Colors.white,
              ),
            ),
          ),
        ),
        const SizedBox(height: 16),
        ElevatedButton(
          onPressed: controller.scaleDown,
          child: const Text('Scale Down'),
        ),
        ElevatedButton(
          onPressed: controller.scaleUp,
          child: const Text('Scale Up'),
        ),
        ElevatedButton(
          onPressed: controller.toggle,
          child: const Text('Toggle'),
        ),
      ],
    );
  }
}

๐Ÿ’“ ZebaPulse #

ZebaPulse creates a continuous pulsing animation.

It is perfect for:

  • Notifications
  • Attention indicators
  • Live status indicators
  • Favorite buttons
  • Loading indicators
  • Promotional elements

Basic Usage #

ZebaPulse(
  child: Container(
    width: 80,
    height: 80,
    decoration: const BoxDecoration(
      shape: BoxShape.circle,
      color: Colors.red,
    ),
    child: const Icon(
      Icons.favorite,
      color: Colors.white,
    ),
  ),
)

๐ŸŽจ Customize Pulse Animation #

ZebaPulse(
  minScale: 0.90,
  maxScale: 1.10,
  duration: const Duration(
    milliseconds: 800,
  ),
  curve: Curves.easeInOut,
  child: const Icon(
    Icons.notifications,
    size: 50,
  ),
)

๐Ÿ” Single Pulse Animation #

ZebaPulse(
  repeat: false,
  child: const Icon(
    Icons.star,
  ),
)

โฏ๏ธ Control Animation Start #

ZebaPulse(
  autoStart: false,
  child: const Icon(
    Icons.favorite,
  ),
)

Available Properties #

Property Description
child Widget displayed inside the pulse
minScale Minimum scale
maxScale Maximum scale
duration Animation duration
curve Animation curve
repeat Repeats the animation
reverse Reverses the animation
autoStart Starts automatically

๐Ÿ–ฑ๏ธ ZebaHoverScale #

ZebaHoverScale creates a smooth scale effect when the mouse pointer enters a widget.

It is ideal for:

  • Flutter Web
  • Windows applications
  • macOS applications
  • Desktop dashboards
  • Cards
  • Navigation items
  • Product cards

Basic Usage #

ZebaHoverScale(
  child: Card(
    child: Padding(
      padding: const EdgeInsets.all(24),
      child: const Text(
        'Hover Over Me',
      ),
    ),
  ),
)

๐ŸŽจ Customize Hover Scale #

ZebaHoverScale(
  scale: 1.10,
  duration: const Duration(
    milliseconds: 250,
  ),
  curve: Curves.easeOut,
  child: Container(
    padding: const EdgeInsets.all(24),
    decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(16),
      color: Colors.blue,
    ),
    child: const Text(
      'Hover Me',
      style: TextStyle(
        color: Colors.white,
      ),
    ),
  ),
)

๐Ÿ–ฑ๏ธ Detect Hover State #

ZebaHoverScale(
  onHoverChanged: (isHovered) {
    debugPrint(
      'Hovered: $isHovered',
    );
  },
  child: const Text(
    'Hover Me',
  ),
)

๐Ÿงฉ Disable Animations #

You can disable animations whenever required.

Disable Scale Animation #

ZebaScale(
  enabled: false,
  child: const Text(
    'Animation Disabled',
  ),
)

Disable Hover Animation #

ZebaHoverScale(
  enabled: false,
  child: const Text(
    'Hover Disabled',
  ),
)

๐ŸŽจ Combining Animations #

You can combine multiple widgets to create more interactive experiences.

ZebaHoverScale(
  scale: 1.08,
  child: ZebaPulse(
    minScale: 0.98,
    maxScale: 1.02,
    child: ZebaScale(
      child: Container(
        padding: const EdgeInsets.all(24),
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(16),
          color: Colors.deepPurple,
        ),
        child: const Text(
          'Interactive Widget',
          style: TextStyle(
            color: Colors.white,
          ),
        ),
      ),
    ),
  ),
)

๐Ÿ“ฑ Platform Support #

Platform Supported
Android โœ…
iOS โœ…
Web โœ…
Windows โœ…
macOS โœ…
Linux โœ…

๐Ÿงช Testing #

Run the package tests:

flutter test

Analyze the package:

flutter analyze

Check the package before publishing:

flutter pub publish --dry-run

๐Ÿ“ Package Structure #

lib/
โ”œโ”€โ”€ zeba_academy_scale.dart
โ””โ”€โ”€ src/
    โ”œโ”€โ”€ controllers/
    โ”‚   โ””โ”€โ”€ scale_controller.dart
    โ””โ”€โ”€ widgets/
        โ”œโ”€โ”€ zeba_hover_scale.dart
        โ”œโ”€โ”€ zeba_pulse.dart
        โ””โ”€โ”€ zeba_scale.dart

๐ŸŒŸ Why Zeba Academy Scale? #

zeba_academy_scale is designed to make interactive animations simple and reusable.

Instead of writing animation controllers repeatedly, you can use ready-to-use widgets:

ZebaScale()
ZebaPulse()
ZebaHoverScale()

Create engaging Flutter interfaces with minimal code.


๐Ÿค Contributing #

Contributions are welcome!

  1. Fork the repository.
  2. Create a feature branch.
  3. Make your changes.
  4. Add or update tests.
  5. Run:
flutter analyze
flutter test
  1. Submit a pull request.

๐Ÿ“„ License #

Copyright ยฉ 2026 Sufyan bin Uzayr.

This project is licensed under the GNU General Public License v3.0.

You may use, modify, and distribute this software under the terms of the GPL-3.0 license.

See the LICENSE file for the complete license text.


About Me #

โœจ Iโ€™m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.

You can learn more about me and my work at sufyanism.com or connect with me on LinkedIn.


Your All-in-One Learning Hub! #

๐Ÿš€ Explore courses and resources in coding, technology, and development at Zeba Academy.

Empower yourself with practical skills through curated tutorials, real-world projects, and hands-on experience. Level up your tech game today! ๐Ÿ’ปโœจ

Zeba Academy is a learning platform dedicated to coding, technology, and development.

โžก Visit our main site: zeba.academy

โžก Explore hands-on courses and resources at: code.zeba.academy

โžก Check out our YouTube channel for more tutorials: zeba.academy

โžก Follow us on Instagram: zeba.academy


Thank you for visiting! ๐Ÿ’œ

Made with โค๏ธ by Zeba Academy.

0
likes
150
points
8
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A lightweight Flutter package for scale, pulse, and hover scale animations.

Homepage

Topics

#flutter #animation #scale #pulse #hover

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on zeba_academy_scale