Skip to content

Instantly share code, notes, and snippets.

View iebrosalin's full-sized avatar

Ivan Brosalin iebrosalin

  • Russia, Barnaul
View GitHub Profile
@yunyu
yunyu / snapping_list_view.dart
Last active October 1, 2023 02:32
A Flutter PageView replacement/snapping ListView for fixed-extent items
import "package:flutter/widgets.dart";
import "dart:math";
class SnappingListView extends StatefulWidget {
final Axis scrollDirection;
final ScrollController controller;
final IndexedWidgetBuilder itemBuilder;
final List<Widget> children;
final int itemCount;