xy_scroll 1.0.3

SDKflutter
Platformandroidioswindowslinuxmacosweb

A Flutter package that provides two-dimensional scrolling functionality.

xy_scroll

XyScroll is a Flutter widget package that enables easy implementation of two-dimensional scrollable grids. It allows you to create content that can be scrolled both vertically and horizontally.

Features

  • Two-dimensional (vertical and horizontal) scrollable grid layout
  • Customizable vertical spacing between items
  • Custom ScrollPhysics for both vertical and horizontal scrolling
  • Customizable padding support

Demo

xy-scroll.webm

Getting Started

  1. Add dependency to pubspec.yaml:
dependencies:
  xy_scroll: ^1.0.0
  1. Install the package:
flutter pub get
  1. Import the package:
import 'package:xy_scroll/xy_scroll.dart';

Usage

Basic example:

XyScroll(
  items: [
    [
      Container(width: 100, height: 100, color: Colors.red),
      Container(width: 100, height: 100, color: Colors.blue),
      Container(width: 100, height: 100, color: Colors.green),
    ],
    [
      Container(width: 100, height: 100, color: Colors.yellow),
      Container(width: 100, height: 100, color: Colors.purple),
      Container(width: 100, height: 100, color: Colors.orange),
    ],
  ],
  verticalSpacing: 16.0,
  padding: EdgeInsets.all(16.0),
)

Applying custom scroll physics:

XyScroll(
  items: itemsList,
  verticalPhysics: BouncingScrollPhysics(),
  horizontalPhysics: ClampingScrollPhysics(),
)

Parameters

ParameterTypeDescription
itemsList<List>2D list of widgets to display
verticalSpacingdoubleSpacing between vertical items (default: 20.0)
verticalPhysicsScrollPhysics?Physics for vertical scrolling
horizontalPhysicsScrollPhysics?Physics for horizontal scrolling
paddingEdgeInsetsGeometry?Padding around the entire scroll view

Additional Information

  • Please report bugs and feature requests on the [Issues page]
  • Pull requests are welcome

License

This project is released under the MIT License.