tiktoklikescroller
0.2.8, released 2 years ago by davidtaylor.io
A vertical fullscreen scroll implementation that snaps in place, similar to TikTok.
What it does
Provides a specialized vertical scrollable widget that snaps pages into place with customizable thresholds, swipe velocities, and animation durations. It includes a controller to listen to scroll events and direction changes.
AI-written summary of version 0.2.8, based on the package's README and metadata. Report an inaccuracy
Use it when
- Building a TikTok-style short video feed or fullscreen vertical card interface
- Needing precise snapping behavior for full-height pages
Skip it when
- Building standard scrolling lists or multi-directional grids
- Needing complex nested scroll views with custom physics outside of full-page snapping
Strengths
- Easy setup for vertical snap scrolling
- Provides velocity and position thresholds for customization
- Includes a controller for tracking scroll actions and events
Weaknesses
- Limited to vertical fullscreen scrolling use cases
- Fewer layout options compared to standard PageView or CustomScrollView
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:flutter/material.dart';
import 'package:tiktoklikescroller/tiktoklikescroller.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<Color> colors = <Color>[Colors.red, Colors.blue, Colors.green];
final Controller controller = Controller();
return MaterialApp(
home: Scaffold(
body: TikTokStyleFullPageScroller(
contentSize: colors.length,
controller: controller,
builder: (BuildContext context, int index) {
return Container(
color: colors[index],
child: Text(
'$index',
style: const TextStyle(fontSize: 48, color: Colors.white),
),
);
},
),
),
);
}
}Alternatives
Packages that do the same job and could replace tiktoklikescroller.
- snapping_sheet_2
A customizable vertical and horizontal sheet widget that snaps to different positions.
50Compare - marquee_widget
A Flutter widget that scrolls text and other widgets with RTL support.
47Compare - scrollable_clean_calendar
A vertically scrolling calendar widget with locale support and date range selection.
50Compare - alphabet_scroll_view
A scrollable list view with a vertical alphabet index for quick jumping.
50Compare