loop_page_view 1.0.9

Flutter Android iOS web

A simple Flutter PageView builder constructor wrapper that allows for "indefinitely" scrolling on both directions.

loop_page_view #

A simple PageView builder constructor wrapper that allows for “indefinitely” scrolling on both directions.

Usage #

Import the package into your code:

import 'package:loop_page_view/loop_page_view.dart';

It works exactly as a PageView builder constructor would, but it always requires an item count, and it requires LoopPageController as its controller. LoopPageController also works just as a PageController would, but it correctly handles LoopPageView indefinitely scrollable list.

Installation #

dependencies:
  loop_page_view: ^1.0.9

Example #

import 'package:flutter/material.dart';
import 'package:loop_page_view/loop_page_view.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Loop Page View Demo'),
        ),
        body: Center(
          child: LoopPageView.builder(
            itemCount: 2,
            itemBuilder: (_, index) {
              return Card(
                child: Center(
                  child: Text('$index'),
                ),
              );
            },
          ),
        ),
      ),
    );
  }
}

Demo #

Author #

Wellington Soares Junior

License #

BSD

1
likes
110
pub points
47%
popularity

A simple Flutter PageView builder constructor wrapper that allows for "indefinitely" scrolling on both directions.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

wjuniorgm@gmail.com

License

BSD (LICENSE)

Dependencies

flutter

More

Packages that depend on loop_page_view