Skip to content

Instantly share code, notes, and snippets.

@AymanProjects
AymanProjects / PaginatedList.dart
Last active February 6, 2022 12:42
Flutter_PaginatedList
import 'package:flutter/material.dart';
class PaginatedList<T> extends StatefulWidget {
/// You should pass a future that paginate itself using [lastItem].
/// And return ``List<T>`` where ``T`` is your database model.
/// An example would be something like this:
/// ```dart
/// return FirebaseFirestore.instance
/// .collection('todos')
/// .orderBy('createdAt')