two_dimensional_page_view 0.0.3 copy "two_dimensional_page_view: ^0.0.3" to clipboard
two_dimensional_page_view: ^0.0.3 copied to clipboard

A Flutter package for Two Dimensional Page View.

two_dimensional_page_view #

A Flutter implementation of Recycling Two Dimensional page View .

Features #

  • 2D scrolling
  • Recycling scroll.

Install #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  two_dimensional_page_view: <latest_version>

In your library add the following import:

import 'package:two_dimensional_page_view/two_dimensional_page_view.dart';

Getting started #

Example:

TwoDimensionalPageView(
    // Called whenever the page in the center of the viewport changes
    onSwipe: (xIndex, yIndex) {},
    // Starting position for page view
    initialPosition: const StartPosition(xIndex: 1, yIndex: 1),
    // A delegate that provides the children for the [TwoDimensionalPageView]
    delegate: TwoDimensionalPageBuilderDelegate<String>(
      // Matrix should have equal sub-lists e.g. 2x3, 3x4
      matrix: [
        ['1', '2', '3'],
        ['4', '5', '6'],
        ['7', '8', '9'],
      ],
      builder: (context, vicinity) {
        return Text('${vicinity.xIndex} ${vicinity.xIndex}');
      },
    ),
  )

Sponsoring #

I'm working on my packages on my free-time, but I don't have as much time as I would. If this package or any other package I created is helping you, please consider to sponsor me so that I can take time to read the issues, fix bugs, merge pull requests and add features to these packages.

Contributions #

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a feature, please send a pull request.

1
likes
140
pub points
12%
popularity

Publisher

unverified uploader

A Flutter package for Two Dimensional Page View.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on two_dimensional_page_view