snapping_page_scroll 1.2.4 copy "snapping_page_scroll: ^1.2.4" to clipboard
snapping_page_scroll: ^1.2.4 copied to clipboard

outdated

A plugin that allows you to make a pageView that scrolls a certain number of pages based on the scroll velocity, and then snaps to the nearest page.

example/example.dart

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

void main() => runApp(App());

class App extends StatelessWidget {

  Widget customCard(String text){
    return Padding(
      padding: EdgeInsets.fromLTRB(20, 100, 20, 100),
      child: Card(
        child: Text(text),
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.amber,
        appBar: AppBar(),
        body: SnappingPageScroll(
          viewportFraction: 0.75,
          children: <Widget>[
            customCard('Card 1'),
            customCard('Card 2'),
            customCard('Card 3'),
            customCard('Card 4'),
            customCard('Card 5'),
            customCard('Card 6'),
          ],
        ),
      ),
    );
  }
}
32
likes
0
pub points
73%
popularity

Publisher

verified publishersolidred.se

A plugin that allows you to make a pageView that scrolls a certain number of pages based on the scroll velocity, and then snaps to the nearest page.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on snapping_page_scroll