sync_scroll 1.0.0 copy "sync_scroll: ^1.0.0" to clipboard
sync_scroll: ^1.0.0 copied to clipboard

outdated

SyncScroll allows you to make synchronous scrolling of two or more scrollable widgets, for example, two horizontal ListView.

SyncScroll #

Synchronous scrolling of multiple scrollable widgets.

Getting Started #

SyncScroll allows you to make synchronous scrolling of two or more scrollable widgets, for example, two horizontal ListView.

For example:

DefaultSyncScrollController(
  Column(
    crossAxisAlignment: CrossAxisAlignment.stretch,
    children: [
      // First ListView
      Container(
        width: double.infinity,
        height: 60,
        child: ClientScrollController(
          builder: (context, controller) => ListView.builder(
            physics: BouncingScrollPhysics(),
            controller: controller,
            scrollDirection: Axis.horizontal,
            itemCount: 20,
            itemBuilder: (context, index) => Container(
              width: 80,
              height: 60,
              alignment: Alignment.center,
              child: Text('Cell $index'),
            ),
          ),
        ),
      ),

      const Divider(),

      // Second ListView
      Container(
        width: double.infinity,
        height: 60,
        child: ClientScrollController(
          builder: (context, controller) => ListView.builder(
            physics: BouncingScrollPhysics(),
            controller: controller,
            scrollDirection: Axis.horizontal,
            itemCount: 20,
            itemBuilder: (context, index) => Container(
              width: 80,
              height: 60,
              alignment: Alignment.center,
              child: Text('Cell $index'),
            ),
          ),
        ),
      ),

    ],
  ),
);
6
likes
40
points
11
downloads

Publisher

verified publisheramazingsoftworks.com

Weekly Downloads

SyncScroll allows you to make synchronous scrolling of two or more scrollable widgets, for example, two horizontal ListView.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on sync_scroll