tiktoklikescroller 0.0.2 copy "tiktoklikescroller: ^0.0.2" to clipboard
tiktoklikescroller: ^0.0.2 copied to clipboard

outdated

A vertical fullscreen scroll implementation that snaps in place, similar to the TikTok app

tiktoklikescroller #

A vertical fullscreen scroll implementation that snaps in place, similar to the TikTok app

Installing #

Add the package to your pubspec.yaml file:

Usage #

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

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    List colors = [Colors.red, Colors.blue, Colors.yellow];

    return Scaffold(
      body: TikTokStyleFullPageScroller(
        contentSize: colors.length,
        swipeThreshold: 0.2, // the fraction of the screen needed to scroll
        swipeVelocityThreshold: 2000, // the velocity threshold for smaller scrolls
        builder: (context, index) {
          return Container(
            color: colors[index],
          );
        },
      ),
    );
  }
}
190
likes
0
pub points
96%
popularity

Publisher

verified publisherdavidtaylor.io

A vertical fullscreen scroll implementation that snaps in place, similar to the TikTok app

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on tiktoklikescroller