{"id":26477529,"url":"https://github.com/intuosol/hover_scale_handler","last_synced_at":"2025-03-20T00:47:33.004Z","repository":{"id":280898786,"uuid":"943528480","full_name":"intuosol/hover_scale_handler","owner":"intuosol","description":"A Flutter widget that adds hover and tap scale animations to any widget, enhancing user interaction with visual feedback.","archived":false,"fork":false,"pushed_at":"2025-03-18T02:30:51.000Z","size":6809,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-18T03:29:56.575Z","etag":null,"topics":["animations","dart","flutter","hover-effects","interaction"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/hover_scale_handler","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intuosol.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-05T21:15:52.000Z","updated_at":"2025-03-18T02:30:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0f38902-25ed-4f5c-a3a4-4544a9d28b03","html_url":"https://github.com/intuosol/hover_scale_handler","commit_stats":null,"previous_names":["intuosol/hover_scale_handler"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuosol%2Fhover_scale_handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuosol%2Fhover_scale_handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuosol%2Fhover_scale_handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuosol%2Fhover_scale_handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intuosol","download_url":"https://codeload.github.com/intuosol/hover_scale_handler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244530998,"owners_count":20467388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animations","dart","flutter","hover-effects","interaction"],"created_at":"2025-03-20T00:47:32.531Z","updated_at":"2025-03-20T00:47:32.988Z","avatar_url":"https://github.com/intuosol.png","language":"Dart","readme":"# HoverScaleHandler \u003cimg src=\"https://raw.githubusercontent.com/intuosol/intuosol_design_system/main/assets/logos/by_intuosol.png\" alt=\"Icon\" width=\"250\" style=\"margin-left: 20px;\"\u003e\n\n[![platform](https://img.shields.io/badge/platform-flutter-blue.svg)](https://flutter.dev)\n[![pub package](https://img.shields.io/pub/v/hover_scale_handler.svg)](https://pub.dev/packages/hover_scale_handler)\n[![pub points](https://img.shields.io/pub/points/hover_scale_handler)](https://pub.dev/packages/hover_scale_handler/score)\n[![documentation](https://img.shields.io/badge/api-documentation-blue.svg)](https://pub.dev/documentation/hover_scale_handler)\n[![interactive demo](https://img.shields.io/badge/interactive-demo-white.svg)](https://intuosol.github.io/hover_scale_handler/)\n[![last updated](https://img.shields.io/github/last-commit/intuosol/hover_scale_handler.svg)](https://github.com/intuosol/hover_scale_handler/commits/main)\n[![by](https://img.shields.io/badge/by-IntuoSol-success.svg)](https://intuosol.com)\n\nA Flutter widget that adds hover and tap scale animations to any widget, enhancing user interaction with visual feedback.\n\nTry it out in the [demo app](https://intuosol.github.io/hover_scale_handler/).\n\n## Features\n\n- Scales widgets up when hovered over with a mouse\n- Provides tap animation feedback\n- Works with any Flutter widget\n- Customizable tooltip support\n- Simple and easy to use\n\n## Usage\n\nImport the package:\n\n```dart\nimport 'package:hover_scale_handler/hover_scale_handler.dart';\n```\n\nWrap any widget with `HoverScaleHandler` to add hover and tap animations:\n\n```dart\nHoverScaleHandler(\n  tooltip: 'Click me', // Optional tooltip\n  onTap: () {\n    // Handle tap event\n    print('Widget tapped!');\n  },\n  child: Container(\n    padding: const EdgeInsets.all(16),\n    color: Colors.blue,\n    child: const Text(\n      'Hover over me',\n      style: TextStyle(color: Colors.white),\n    ),\n  ),\n)\n```\n\n### Examples\n\n#### Card with hover effect\n\n```dart\nHoverScaleHandler(\n  tooltip: 'Card example',\n  onTap: () {\n    // Handle card tap\n  },\n  child: Card(\n    elevation: 4,\n    child: Padding(\n      padding: const EdgeInsets.all(16.0),\n      child: Column(\n        mainAxisSize: MainAxisSize.min,\n        children: [\n          const Icon(Icons.credit_card, size: 40),\n          const SizedBox(height: 8),\n          const Text('Interactive Card'),\n        ],\n      ),\n    ),\n  ),\n)\n```\n\n#### List items with hover effect\n\n```dart\nHoverScaleHandler(\n  tooltip: 'List item',\n  onTap: () {\n    // Handle item tap\n  },\n  child: ListTile(\n    leading: const Icon(Icons.star),\n    title: const Text('List Item'),\n    subtitle: const Text('Tap or hover to interact'),\n  ),\n)\n```\n\n#### Icons with hover effect\n\n```dart\nHoverScaleHandler(\n  tooltip: 'Like',\n  onTap: () {\n    // Handle icon tap\n  },\n  child: const Padding(\n    padding: EdgeInsets.all(8.0),\n    child: Icon(Icons.thumb_up, size: 30, color: Colors.blue),\n  ),\n)\n```\n\n### Customization Options\n\nThe `HoverScaleHandler` widget is highly customizable:\n\n```dart\nHoverScaleHandler(\n  // Required parameters\n  child: myWidget,\n\n  // Optional parameters with their default values\n  onTap: () {}, // If null, hover effect is disabled\n  tooltip: '', // Tooltip text shown on hover\n  scaleOnHover: 1.05, // Scale factor when hovering (1.05 = 5% larger)\n  defaultScale: 1.0, // Default scale when not hovering\n  animationDuration: const Duration(milliseconds: 100), // Animation duration\n  tooltipWaitDuration: const Duration(milliseconds: 500), // Delay before showing tooltip\n  tapAnimationDelay: const Duration(milliseconds: 50), // Additional delay after tap animation\n  cursor: SystemMouseCursors.click, // Cursor to show when hovering\n\n  // Animation customization\n  curve: Curves.easeInOut, // Animation curve when hovering and tapping\n  reverseCurve: null, // Animation curve on hover exit (uses curve if null)\n\n  // Behavior customization\n  hitTestBehavior: HitTestBehavior.opaque, // Controls how hit testing works\n  enableFeedback: false, // Whether to provide haptic feedback when tapped\n)\n```\n\n#### Animation Curves\n\nYou can use different animation curves to control how the scaling effect behaves:\n\n```dart\n// Using a bounce effect for more playful animations\nHoverScaleHandler(\n  curve: Curves.bounceOut, // Bouncy animation on hover and tap\n  reverseCurve: Curves.easeOut, // Smooth animation on hover exit\n  onTap: () =\u003e print('Tapped with bounce effect'),\n  child: myWidget,\n)\n```\n\n#### Haptic Feedback\n\nEnable haptic feedback for a more tactile experience on supported devices:\n\n```dart\nHoverScaleHandler(\n  enableFeedback: true, // Provides haptic feedback when tapped\n  onTap: () =\u003e print('Tapped with haptic feedback'),\n  child: myWidget,\n)\n```\n\n#### Disabling Hover Effect\n\nIf `onTap` is set to `null`, the hover scale effect will be disabled completely:\n\n```dart\n// This widget will not show hover effects or respond to taps\nHoverScaleHandler(\n  onTap: null, // Disable hover effects and tap functionality\n  child: myWidget,\n)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintuosol%2Fhover_scale_handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintuosol%2Fhover_scale_handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintuosol%2Fhover_scale_handler/lists"}