free_scroll 1.0.2 copy "free_scroll: ^1.0.2" to clipboard
free_scroll: ^1.0.2 copied to clipboard

A Flutter package that enables freeform scrolling and zooming of widgets within a constrained area.

Free Scroll #

A Flutter package that enables freeform scrolling and zooming of widgets within a constrained area. This package is optimized for both touchscreen devices (like mobile, tablets, and touch-enabled PCs) and non-touchscreen devices (such as traditional desktop PCs and laptops). Whether you're using touch gestures or a mouse, FreeScroll provides a smooth zooming and scrolling experience.

Features #

  • Zooming: Supports pinch-to-zoom gestures for touchscreen devices, allowing users to zoom in and out with customizable minScale and maxScale values.
  • Scrolling: Freeform scrolling in any direction (horizontal and vertical) while zooming in or out.
  • Touchscreen and Non-Touchscreen Support: Ideal for touchscreen devices (mobile, tablets, touch-enabled PCs) and non-touchscreen devices (desktop PCs). It supports pinch-to-zoom for touchscreens and mouse scroll zooming for non-touch devices.
  • Pointer Scroll Zooming: For desktop users, zooming can be done using mouse scroll gestures.
  • Customizable Layout: Configure padding, spacing, and constraints for width and height, making it flexible for various UI designs.
  • Responsive Layout: Utilizes the Wrap widget for a flexible grid-like layout.

Installation #

Add the following dependency to your pubspec.yaml file:

dependencies:
  free_scroll: ^latest_version

Usage #

FreeScroll(
  itemCount: 20,
  itemBuilder: (context, index) {
    return Container(
      width: 120,
      height: 120,
      color: Colors.teal,
      alignment: Alignment.center,
      child: Text('Item $index', style: TextStyle(color: Colors.white)),
    );
  },
)

Parameters #

Parameter Type Description
itemCount Required The number of items to display in the scrollable area.
itemBuilder Required A function to build the widget for each item.
backgroundColor Optional The background color of the scrollable area (defaults to light gray).
minScale Optional The minimum scale factor for zooming (defaults to 1.0).
maxScale Optional The maximum scale factor for zooming (defaults to 3.0).
width Optional The width of the scrollable area (defaults to double.infinity).
height Optional The height of the scrollable area (defaults to double.infinity).
padding Optional Padding around the scrollable area (defaults to EdgeInsets.all(20.0)).
spacing Optional Horizontal spacing between items in the grid (defaults to 15.0).
runSpacing Optional Vertical spacing between items in the grid (defaults to 15.0).
25
likes
0
points
41
downloads

Publisher

verified publisherfazilkp.in

Weekly Downloads

A Flutter package that enables freeform scrolling and zooming of widgets within a constrained area.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_hooks

More

Packages that depend on free_scroll