Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 2.45 KB

File metadata and controls

52 lines (33 loc) · 2.45 KB

Single Child Two Dimensional Scroll View

Pub Package GitHub Issues GitHub Forks GitHub Stars GitHub License

A package that provides a widget that allows a single child to scroll in two dimensions, built on the two-dimensional foundation of the Flutter framework.

Features

This package provides support for a SingleChildTwoDimensionalScrollView widget that scrolls in both the vertical and horizontal axes.

SingleChildTwoDimensionalScrollView

SingleChildTwoDimensionalScrollView is insipired by SingleChildScrollView API and based on TwoDimensionalScrollView.

  • Scroll diagonally, or lock axes with the diagonalDragBehavior type.

Getting started

Depend on it

Run this command with Flutter:

$ flutter pub add single_child_two_dimensional_scroll_view

Import it

Now in your Dart code, you can use:

import 'package:single_child_two_dimensional_scroll_view/single_child_two_dimensional_scroll_view.dart';

Usage

SingleChildTwoDimensionalScrollView

The code in example/ shows a SingleChildTwoDimensionalScrollView that allows a 2000 x 2000 pixel child scroll in two dimensions.

Additional information

The package uses the two-dimensional foundation from the Flutter framework, meaning most of the core functionality of 2D scrolling is not implemented here. This also means any subclass of the foundation can create different 2D scrolling widgets and be added to the collection. If you want to contribute to this package, you can open a pull request in Flutter Packages and add the tag "p: two_dimensional_scrollables".