All Projects → ariedov → Flutter_snaplist

ariedov / Flutter_snaplist

Licence: mit
A small library for creating snapping lists.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Flutter snaplist

Qfield
A simplified touch optimized interface for QGIS
Stars: ✭ 286 (-8.63%)
Mutual labels:  mobile
Yampa
Functional Reactive Programming domain-specific language embedded in Haskell, for programming efficient hybrid (mixed discrete-time and continuous-time) systems.
Stars: ✭ 294 (-6.07%)
Mutual labels:  mobile
Remoto
Ultra-simple RPC ecosystem designed for right now.
Stars: ✭ 304 (-2.88%)
Mutual labels:  mobile
Realm Object Server
Tracking of issues related to the Realm Object Server and other general issues not related to the specific SDK's
Stars: ✭ 289 (-7.67%)
Mutual labels:  mobile
Nat
A powerful kit for adding native functionalities to your weex app.
Stars: ✭ 294 (-6.07%)
Mutual labels:  mobile
Bodyweight Fitness Android
Bodyweight Fitness (Android)
Stars: ✭ 297 (-5.11%)
Mutual labels:  mobile
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+5190.73%)
Mutual labels:  mobile
Perfi
Personal finance assistance with ReactNative
Stars: ✭ 312 (-0.32%)
Mutual labels:  mobile
Okuna App
📱 The Okuna social network cross-platform mobile app
Stars: ✭ 294 (-6.07%)
Mutual labels:  mobile
Ultimate Python Resource Hub
The Ultimate resource hub of Python: All at one place
Stars: ✭ 298 (-4.79%)
Mutual labels:  mobile
Flutterhole
A third party Android application for the Pi-Hole® dashboard.
Stars: ✭ 292 (-6.71%)
Mutual labels:  mobile
Localresizeimg
🔥 前端本地客户端压缩图片,兼容IOS,Android,PC、自动按需加载文件
Stars: ✭ 3,135 (+901.6%)
Mutual labels:  mobile
Status React
a free (libre) open source, mobile OS for Ethereum
Stars: ✭ 3,307 (+956.55%)
Mutual labels:  mobile
Fonoapi
☎️ FonoApi - Mobile Device Description API
Stars: ✭ 288 (-7.99%)
Mutual labels:  mobile
Cordova Android
Apache Cordova Android
Stars: ✭ 3,285 (+949.52%)
Mutual labels:  mobile
Mint Ui
Mobile UI elements for Vue.js
Stars: ✭ 16,471 (+5162.3%)
Mutual labels:  mobile
Buttercup Mobile
📱 React-Native mobile application for Buttercup
Stars: ✭ 297 (-5.11%)
Mutual labels:  mobile
Cordova Docs
Apache Cordova Documentation
Stars: ✭ 315 (+0.64%)
Mutual labels:  mobile
Dialog2
移动端弹窗插件第二版,包括常见的 alert、confirm。toast、notice 四种类型弹窗,支持 jQuery 和 Zepto 库。(已停止维护,请使用vue、react 等新框架)
Stars: ✭ 311 (-0.64%)
Mutual labels:  mobile
Thera
Thera is an integrated development environment(IDE) powered by Alibaba.com aimed for improving mobile hybrid solution develop experience, such as weex, luaview, react native.
Stars: ✭ 298 (-4.79%)
Mutual labels:  mobile

awesome flutter pub package

snaplist

A small cozy library that allows you to make snappable list views.

Issues and Pull Requests are really appreciated!

Snaplist supports different and even dynamically sized children to be listed and correctly snapped.

Showcase

Showscase gif

Include to your project

In your pubspec.yaml root add:

dependencies:
  snaplist: ^0.1.8

Include

The library does provide StatefulWidget which is called SnapList.

Include the widget like this: import 'package:snaplist/snaplist.dart';

Usage

Use it as you'd use any widget:

Widget build(BuildContext context) {
  return SnapList(
    sizeProvider: (index, data) => Size(100.0, 100.0),
    separatorProvider: (index, data) => Size(10.0, 10.0),
    builder: (context, index, data) => SizedBox(),
    count: 1,
  );
}

Snaplist uses gesture detection for swiping the list, so, please, be sure that the gestures you apply to the widgets inside are not overlapping for best user experience.

Properties

There are 4 required fields:

  • sizeProvider is a provider of each widget size. The library will wrap each built widget to a sized box of specified size. This is required so snapping calculations will work correctly.
  • separatorProvider is similar to sizeProvider, but this size will be used to build the list separators.
  • builder works like a regular Flutter builder all of us are familiar with. It will pass you the context, current item index and some additional data.
  • count - Children count as in a ListView.

The data which is provided to each provider and the builder is a combination of three fields:

  • center - is the position which is now displayed and referenced as the center widget.
  • next - is the position which the user is scrolling to. It is -1 if idle.
  • progress - is the scroll and snip progress. The values are from 0 to 100.

Snaplist defaults to horizontal scrolling. You can set axis to Axis.vertical for vertical scrolling.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].