hover_zoom_image
A Flutter package that enables smooth image zoom effects on hover. Ideal for showcasing high-resolution images with an interactive zoom feature, perfect for web applications and galleries.
Demo
Installation
Add this to your pubspec.yaml
file:
dependencies:
hover_zoom_image: <latest-version>
or
flutter pub add hover_zoom_image
Implementation
Import the package in your Dart file:
import 'package:hover_zoom_image/hover_zoom_image.dart';
Usage
The HoverZoomImage widget allows you to add a smooth zoom effect on images when hovering. You can wrap this widget in MaterialApp or use it within a single Widget.
MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Hover Zoom Image',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: Center(
child: HoverZoomImage(
imageProvider: const AssetImage('assets/images/sample.jpg'),
width: 550,
height: 700,
zoomScale: 2.5,
animationDuration: Duration(milliseconds: 150),
),
),
);