Skip to content

How to implement list pagination via signals? #226

Answered by rodydavis
milansurelia asked this question in Q&A
Discussion options

You must be logged in to vote

Here is an example with pocketbase:

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:pocketbase/pocketbase.dart';
import 'package:signals/signals_flutter.dart';

class InfiniteScroll extends StatefulWidget {
  const InfiniteScroll({
    super.key,
    required this.service,
    required this.itemBuilder,
    required this.filter,
  });

  final RecordService service;
  final Widget Function(BuildContext, int, RecordModel model) itemBuilder;
  final String Function(String) filter;

  @override
  State<InfiniteScroll> createState() => InfiniteScrollState();
}

class InfiniteScrollState extends State<InfiniteScroll> {
  final scrollController = ScrollController()…

Replies: 6 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rodydavis
Comment options

You must be logged in to vote
3 replies
@rodydavis
Comment options

@rajatsingla
Comment options

@rajatsingla
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation question Further information is requested
4 participants
Converted from issue

This discussion was converted from issue #212 on April 06, 2024 11:26.