A library for widgets that load their content one page (or batch) at a time.

Overview

A library for widgets that load their content one page (or batch) at a time (also known as lazy-loading and pagination).

flutter_pagewise

Features

  • Load data one page at a time
  • Retry failed pages
  • Override the default loading, retry, and error widgets if desired
  • Manage loading of data more closely using a PagewiseLoadController
  • ListView and GridView implementations
  • SliverList and SliverGrid implementations
  • Extendability using inheritance

Breaking Change Starting V1.0.0:

The library has been rewritten in version 1.0.0 to provide a more efficient implementation that does not require a totalCount parameter and shows only one loading sign when users scroll down. In addition, a new parameter has been added to itemBuilder callback to provide the index if needed by the user.

Installing the library:

Like any other package, add the library to your pubspec.yaml dependencies:

dependencies:
    flutter_pagewise:

Then import it wherever you want to use it:

import 'package:flutter_pagewise/flutter_pagewise.dart';

Using the library

Check out the example

The library provides the following widgets:

  • PagewiseGridView: A pagewise implementation of GridView. It could be used as follows:
PagewiseGridView.count(
  pageSize: 10,
  crossAxisCount: 2,
  mainAxisSpacing: 8.0,
  crossAxisSpacing: 8.0,
  childAspectRatio: 0.555,
  padding: EdgeInsets.all(15.0),
  itemBuilder: (context, entry, index) {
    // return a widget that displays the entry's data
  },
  pageFuture: (pageIndex) {
    // return a Future that resolves to a list containing the page's data
  },
);
  • PagewiseListView: A pagewise implementation of ListView. It could be used as follows:
PagewiseListView(
  pageSize: 10,
  padding: EdgeInsets.all(15.0),
  itemBuilder: (context, entry, index) {
    // return a widget that displays the entry's data
  },
  pageFuture: (pageIndex) {
    // return a Future that resolves to a list containing the page's data
  }
);
  • PagewiseSliverGrid: A pagewise implementation of SliverGrid. It could be used similar to PagewiseGridView for cases where a sliver is needed.
  • PagewiseSliverList: A pagewise implementation of SliverList. It could be used similar to PagewiseListView for cases where a sliver is needed.

The classes provide all the properties of ListViews and GridViews. In addition, you must provide the itemBuilder, which tells Pagewise how you want to render each element, and pageFuture, which Pagewise calls to fetch new pages. Please note that pageFuture must not return more values than mentioned in the pageSize parameter.

Customizing the widget:

In addition to the required parameters, Pagewise provides you with optional parameters to customize the widget. You have loadingBuilder, errorBuilder, noItemsFoundBuilder, and retryBuilder to customize the widgets that show on loading, error, no found items and retry respectively.

The loadingBuilder can be used as follows:

loadingBuilder: (context) {
  return Text('Loading...');
}

The noItemsFoundBuilder can be used as follows:

noItemsFoundBuilder: (context) {
  return Text('No Items Found');
}

The retryBuilder can be used as follows:

retryBuilder: (context, callback) {
  return RaisedButton(
    child: Text('Retry'),
    onPressed: () => callback()
  );
}

Thus, the retryBuilder provides you with a callback that you can call when you want to retry.

The errorBuilder is only relevant when showRetry is set to false, because, otherwise, the retryBuilder is shown instead. The errorBuilder can be used as follows:

errorBuilder: (context, error) {
  return Text('Error: $error');
}

Check the classes' documentation for more details.

Providing your own PagewiseLoadController:

Pagewise widgets manage the loading of pages using a PagewiseLoadController. This controller is responsible for fetching data, handling errors, etc.

You don't have to provide a controller yourself when creating a Pagewise widget. The widget will create one for you. However you might wish to create one yourself in order to achieve some effects.

Notice though that if you provide a controller yourself, you should provide the [pageFuture] and [pageSize] parameters to the controller instead of the widget.

A possible use case of the controller is to force a reset of the loaded pages using a RefreshIndicator. you could achieve that as follows (note that we added the Future.value({}) as a dummy return value, because onRefresh expects a Future, but reset does not return one):

final _pageLoadController = PagewiseLoadController(
  pageSize: 6,
  pageFuture: BackendService.getPage
);

@override
Widget build(BuildContext context) {
  return RefreshIndicator(
    onRefresh: () async {
      this._pageLoadController.reset();
      await Future.value({});
    },
    child: PagewiseListView(
        itemBuilder: this._itemBuilder,
        pageLoadController: this._pageLoadController,
    ),
  );
}

Another use case for creating the controller yourself is if you want to listen to the state of Pagewise and act accordingly. For example, you might want to show a snackbar when we reach the end of the list In that case, you could do:

final _pageLoadController = PagewiseLoadController(
  pageSize: 6,
  pageFuture: BackendService.getPage
);

@override
void initState() {
  super.initState();
  this._pageLoadController.addListener(() {
    if (!this._pageLoadController.hasMoreItems) {
      Scaffold.of(context).showSnackBar(
        SnackBar(
          content: Text('No More Items!')
        )
      );
    }
  });
}

Creating your own Pagewise Widgets:

You need to inherit from the Pagewise class. Check the code of PagewiseListView and PagewiseGridView for examples

Comments
  • Providing own PagewiseLoadController and using reset() messes up PageIndex

    Providing own PagewiseLoadController and using reset() messes up PageIndex

    Hey there!

    First of all, this is an awesome package! It has really saved me a ton of work. Thank you very much for the work you have done.

    However, I have run into some problems using this package. I have recently changed my code so that my list (using Pagewise) is now using my own PagewiseLoadController that I have stored in a scoped model. I have done this in order to be able to reset the list/controller when I change an aspect of whatever should be fetched and displayed in the list (I'm making a simple movie app, and when I change the category of movies to fetch, I have to reset the Pagewise controller so that it can start over and start with the future that is now fetched using the new category).

    When the app is first started there's no problems, and scrolling down fetches the next pages as expected. However, the problem occurs when I change the category (thereby also calling myPageWiseController.reset() ), which then fetches the first page with the new category correctly, but scrolling down makes the first fetched page loop, so that its basically just an infinite list of the movies from the first fetched page displaying over and over.

    I've tried printing the PageIndex whenever a new fetch occurs from scrolling to the bottom, and I can see that the PageIndex stops incrementing after I change the category and reset the controller, but before that (when the app is first started) it increments totally fine. A look at the debug console shows the following:

    Launching lib\main.dart on Pixel in debug mode... Built build\app\outputs\apk\debug\app-debug.apk. I/flutter ( 4688): 1 I/flutter ( 4688): 2 I/flutter ( 4688): 3 I/flutter ( 4688): 4 I/flutter ( 4688): 5

    Here I change the category to something else than what the app initially starts with.

    I/flutter ( 4688): 1

    Initially it fetches the first page fine, as shown by the 1 above, but after scrolling to the bottom, the following is printed.

    I/chatty ( 4688): uid=10369(com.example.myapp) 1.ui identical 7 lines I/flutter ( 4688): 1

    I don't know why that 1 above shows, it is not because of any change in the app, other than scrolling, the category is still the same.

    When I change the category to something else again, the 1 below is shown and the first page with the new category is fetched normally, after which the same error shows up.

    I/flutter ( 4688): 1 I/chatty ( 4688): uid=10369(com.example.myapp) 1.ui identical 8 lines Application finished. Exited (sigint)

    Here is the relevant code:

    My own PageWiseLoadController setup:

    pageLoadController = PagewiseLoadController(
          pageSize: 20,
          pageFuture: (int pageIndex) => fetchMovies(pageIndex),
        );
    

    Resetting the controller/list:

    void resetList() {
        _pageLoadController.reset();
      }
    

    The fetchMovies method (I'm incrementing the pageIndex, simply because the pageIndex starts at 0 but I have to start it at 1 for the fetching to work):

    Future<List<Results>> fetchMovies(int pageIndex) async {
        pageIndex++;
        print(pageIndex);
    
        String category = (_categoryNow != null) ? _categoryNow.path : "popular";
        String url = "$baseUrl$category?api_key=$apiKey&page=$pageIndex&region=$_region";
    
        var response = await http.get(url);
        var decodeJson = jsonDecode(response.body);
    
        Movie newContent = Movie.fromJson(decodeJson);
        return newContent.results;
      }
    

    My widget for the list:

    class ContentList extends StatelessWidget {
      Widget build(BuildContext context) {
        return ScopedModelDescendant<ContentModel>(
          builder: (context, child, model) {
            return PagewiseListView(
              pageLoadController: model.pageLoadController,
              itemBuilder: (context, entry, _) => MovieCard(entry),
              noItemsFoundBuilder: (context) => Text('No Items Found'),
              retryBuilder: (context, callback) {
                return RaisedButton(
                  child: Text('Retry'),
                  onPressed: () => model.resetList(),
                );
              },
            );
          },
        );
      }
    }
    

    I've tried to describe the issue as best as I can, and hopefully I provided enough information/code for you to understand it.

    opened by blendstrup 22
  • '(BuildContext, dynamic, int) => dynamic' is not a subtype of type '(BuildContext, dynamic, int) => Widget'.

    '(BuildContext, dynamic, int) => dynamic' is not a subtype of type '(BuildContext, dynamic, int) => Widget'.

    Returning post.test() in itemBuilder() yields the following error. I cannot seem to get pass it other than constructing the widget in the same class as the pagewise Widget instead of the the Post widget.

    post.dart

    import 'package:flutter/material.dart';
    import 'package:shannon/comment_page.dart';
    
    class Post {
      final String id;
      final String content;
      final double latitude;
      final double longitude;
      final int time;
      final String username;
    
      Post({this.id, this.content, this.latitude, this.longitude, this.time, this.username});
    
      factory Post.fromJson(Map<String, dynamic> json) {
        print(json['content']);
        return Post(
          id: json ['id'],
          content: json['content'],
          latitude: json['latitude'],
          longitude: json['longitude'],
          time: json['time'],
          username: json['username'],
        );
      }
    
      Widget test(){
        return ListTile(title: Text("A"));
      }
    }
    
    Performing hot restart...
    Restarted application in 2,556ms.
    I/flutter ( 5696): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
    I/flutter ( 5696): The following assertion was thrown building FeedPage(dirty, state: _FeedPage#5841c):
    I/flutter ( 5696): type '(BuildContext, dynamic, int) => dynamic' is not a subtype of type '(BuildContext, dynamic,
    I/flutter ( 5696): int) => Widget'
    I/flutter ( 5696):
    I/flutter ( 5696): Either the assertion indicates an error in the framework itself, or we should provide substantially
    I/flutter ( 5696): more information in this error message to help you determine and fix the underlying cause.
    I/flutter ( 5696): In either case, please report this assertion by filing a bug on GitHub:
    I/flutter ( 5696):   https://github.com/flutter/flutter/issues/new?template=BUG.md
    I/flutter ( 5696):
    I/flutter ( 5696): When the exception was thrown, this was the stack:
    I/flutter ( 5696): #0      new PagewiseListView (package:flutter_pagewise/flutter_pagewise.dart:505:26)
    I/flutter ( 5696): #1      _FeedPage.build (package:shannon/feed_page.dart:75:13)
    I/flutter ( 5696): #2      StatefulElement.build (package:flutter/src/widgets/framework.dart:3809:27)
    I/flutter ( 5696): #3      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3721:15)
    I/flutter ( 5696): #4      Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
    I/flutter ( 5696): #5      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3701:5)
    I/flutter ( 5696): #6      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3848:11)
    I/flutter ( 5696): #7      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3696:5)
    I/flutter ( 5696): #8      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
    I/flutter ( 5696): #9      Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
    I/flutter ( 5696): #10     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)
    I/flutter ( 5696): #11     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
    I/flutter ( 5696): #12     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2286:33)
    I/flutter ( 5696): #13     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:676:20)
    I/flutter ( 5696): #14     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
    I/flutter ( 5696): #15     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
    I/flutter ( 5696): #16     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
    I/flutter ( 5696): #17     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:751:7)
    I/flutter ( 5696): #19     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
    I/flutter ( 5696): #20     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
    I/flutter ( 5696): #21     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
    I/flutter ( 5696): (elided one frame from package dart:async)
    I/flutter ( 5696): ════════════════════════════════════════════════════════════════════════════════════════════════════
    
    opened by ghost 9
  • Length called on Null ERROR

    Length called on Null ERROR

    I followed the examples stated carefully but each time I try to use the plugin, my future completes with data successfully(i could log them to console ) but then I get the length called on Null error. On checking error stack It pointed to a line With

    Page.lenght <= another test case here

    But looking at this plugin, there's no provision for page length, So definitely that value might just b null, or is there something I am missing ?

    Also my Code is almost as exact as your example below . `Class PagewiseListViewExample extends StatelessWidget { static const int PAGE_SIZE = 10;

    @override Widget build(BuildContext context) { return PagewiseListView( pageSize: PAGE_SIZE, itemBuilder: this._itemBuilder, pageFuture: (pageIndex) => BackendService.getPosts(pageIndex * PAGE_SIZE, PAGE_SIZE)); }

    Widget _itemBuilder(context, PostModel entry, _) { return Column( children: [ ListTile( leading: Icon( Icons.person, color: Colors.brown[200], ), title: Text(entry.title), subtitle: Text(entry.body), ), Divider() ], ); } }`

    opened by asapJ 7
  • Dart SDK version Error

    Dart SDK version Error

    Running "flutter packages get" in app...
    The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.

    Because app depends on flutter_pagewise >=1.2.2 which requires SDK version >=2.1.0 <3.0.0, version solving failed.

    pub get failed (1)

    opened by codeXLinkX 6
  • Suggestion: use controller pattern

    Suggestion: use controller pattern

    The plugin works nice but it would be good to have info have many pages have been loaded, etc. Also setup is kind of annoying because you have to pass bunch of callback which are dynamic for some reason.

    Flutter uses Controller pattern, for example TextEditingController that stores this kind of data, so that it can be accessed from other widges. Something like this would probably work:

    abstract class PageLoaderController<T> extends ChangeNotifier {
      Future<List<dynamic>> loadPage(int index);
      int get totalCount;
      int get pageSize;
    }
    
    opened by szotp 6
  • New version 1.2.0 integration with Wordpress

    New version 1.2.0 integration with Wordpress

    Hi guys, I've checked Your new version and it's a little confusing for me. Could You please explain me how do I integrate this with a JSON request that is paginated? What I mean is that I have a JSON request that should pull 1243 results, but I don't want then to be loaded at once. So the JSON request is called every time I get to the end of the 10 results I just pulled.

    Does it make sense?

    Thanks for Your time!

    opened by raffaelecolleo 5
  • home route quirk

    home route quirk

    Greetings, I opened an issue earlier today but then closed it when I realized that it was a flutter isssue, not a flutter_pagewise issue.

    However, this may help you:

    Flutter seems to initialize the home route in parallel with the main widget initialization.

    Therefore, if you happen to be using a PagewiseListView on your home route, then PagewiseListview will attempt to render, but finding an empty list of entries, will show only the retry button.

     child: MaterialApp(
            home: EntriesPage(),   // problem if this widget contains a PagewiseListView
            routes: {
            //...
            }
    

    So, probably what I will do is show a splash screen until data is initialized. Hope this helps, DA

    opened by sensiblearts 4
  • Can't publish new version

    Can't publish new version

    @AbdulRahmanAlHamali -- I just tried to publish the latest version and got this:

    UnauthorizedAccess: Unauthorized user: [email protected] is not allowed to upload versions to package flutter_pagewise..

    Can you modify the rights so both @KaYBlitZ and I can publish if needed?

    Thanks

    opened by sjmcdowall 3
  • exception if there is only items <= pageSize

    exception if there is only items <= pageSize

    This pluginn is working great except this exception where there is one one item

    Code:-

    return Scaffold(
          backgroundColor: Colors.white,
          appBar: new AppBar(
            centerTitle: true,
            title: new Text(
              widget.category.name,
              style: TextStyle(fontWeight: FontWeight.normal),
            ),
            leading: IconButton(
              icon: Icon(Icons.arrow_back_ios),
              onPressed: () => Navigator.of(context).pop(),
            ),
            actions: [
              PopupMenuButton<SortBy>(
                icon: Icon(Icons.sort_by_alpha),
                onSelected: changeSort,
                itemBuilder: (BuildContext context) => <PopupMenuItem<SortBy>>[
                      PopupMenuItem<SortBy>(
                        value: SortBy.AZ,
                        child: Text("A - Z"),
                      ),
                      PopupMenuItem<SortBy>(
                        value: SortBy.ZA,
                        child: Text("Z - A"),
                      ),
                    ],
                elevation: 10.0,
                tooltip: "Sort By",
              ),
            ],
          ),
          body: Container(
            color: Colors.white,
            child: PagewiseGridView.count(
              crossAxisCount:
                  MediaQuery.of(context).orientation == Orientation.portrait
                      ? 2
                      : 4,
              mainAxisSpacing: 4.0,
              crossAxisSpacing: 4.0,
              itemBuilder: (context, entry, _) {
                return ProductCard(entry);
              },
              pageLoadController: pageLoadController,
              childAspectRatio: 1.0,
              noItemsFoundBuilder: (context) {
                return Container(
                  color: Colors.white,
                  child: Center(
                    child: Column(
                      mainAxisSize: MainAxisSize.min,
                      children: <Widget>[
                        Padding(
                          padding: const EdgeInsets.all(8.0),
                          child: Icon(
                            Icons.device_unknown,
                            color: Colors.black26,
                            size: 24,
                          ),
                        ),
                        Text(
                          "No products matching to this criteria",
                          textAlign: TextAlign.center,
                          style: TextStyle(
                            color: Colors.black26,
                          ),
                        ),
                      ],
                    ),
                  ),
                );
              },
              showRetry: true,
              loadingBuilder: (context) {
                return Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: <Widget>[
                    CircularProgressIndicator(),
                    SizedBox(
                      width: 20.0,
                    ),
                    Text('Loading...'),
                  ],
                );
              },
            ),
          ),
        );
    

    Exception Log:- I/flutter (25161): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ I/flutter (25161): The following assertion was thrown during performLayout(): I/flutter (25161): SliverGeometry is not valid: The "maxPaintExtent" is less than the "paintExtent". I/flutter (25161): The maxPaintExtent is 178.0, but the paintExtent is 360.0. By definition, a sliver can't paint more I/flutter (25161): than the maximum that it can paint! I/flutter (25161): The RenderSliver that returned the offending geometry was: I/flutter (25161): RenderSliverGrid#ba222 relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT I/flutter (25161): creator: SliverGrid ← MediaQuery ← SliverPadding ← Viewport ← _ScrollableScope ← I/flutter (25161): IgnorePointer-[GlobalKey#bcd2a] ← Semantics ← Listener ← _GestureSemantics ← I/flutter (25161): RawGestureDetector-[LabeledGlobalKey#e36d5] ← I/flutter (25161): _ScrollSemantics-[GlobalKey#e2845] ← RepaintBoundary ← ⋯ I/flutter (25161): parentData: paintOffset=Offset(0.0, 0.0) (can use size) I/flutter (25161): constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, I/flutter (25161): scrollOffset: 0.0, remainingPaintExtent: 596.7, crossAxisExtent: 360.0, crossAxisDirection: I/flutter (25161): AxisDirection.right, viewportMainAxisExtent: 596.7, remainingCacheExtent: 846.7 cacheOrigin: 0.0 ) I/flutter (25161): geometry: SliverGeometry(scrollExtent: 178.0, paintExtent: 360.0, maxPaintExtent: 178.0, I/flutter (25161): hasVisualOverflow: true, cacheExtent: 360.0) I/flutter (25161): currently live children: 0 to 1 I/flutter (25161): I/flutter (25161): When the exception was thrown, this was the stack: I/flutter (25161): #0 SliverGeometry.debugAssertIsValid..verify (package:flutter/src/rendering/sliver.dart:674:9) I/flutter (25161): #1 SliverGeometry.debugAssertIsValid. (package:flutter/src/rendering/sliver.dart:694:15) I/flutter (25161): #2 SliverGeometry.debugAssertIsValid (package:flutter/src/rendering/sliver.dart:706:6) I/flutter (25161): #3 RenderSliver.debugAssertDoesMeetConstraints (package:flutter/src/rendering/sliver.dart:1061:21) I/flutter (25161): #4 RenderObject.layout. (package:flutter/src/rendering/object.dart:1636:19) I/flutter (25161): #5 RenderObject.layout (package:flutter/src/rendering/object.dart:1636:67) I/flutter (25161): #6 RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:182:11) I/flutter (25161): #7 RenderObject.layout (package:flutter/src/rendering/object.dart:1634:7) I/flutter (25161): #8 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:405:13) I/flutter (25161): #9 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1316:12) I/flutter (25161): #10 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1234:20) I/flutter (25161): #11 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1509:7) I/flutter (25161): #12 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:768:18) I/flutter (25161): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:281:19) I/flutter (25161): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:677:13) I/flutter (25161): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5) I/flutter (25161): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15) I/flutter (25161): #17 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9) I/flutter (25161): #18 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5) I/flutter (25161): #22 _invoke (dart:ui/hooks.dart:156:10) I/flutter (25161): #23 _drawFrame (dart:ui/hooks.dart:143:3) I/flutter (25161): (elided 3 frames from package dart:async) I/flutter (25161): I/flutter (25161): The following RenderObject was being processed when the exception was fired: I/flutter (25161): RenderSliverGrid#ba222 relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT I/flutter (25161): creator: SliverGrid ← MediaQuery ← SliverPadding ← Viewport ← _ScrollableScope ← I/flutter (25161): IgnorePointer-[GlobalKey#bcd2a] ← Semantics ← Listener ← _GestureSemantics ← I/flutter (25161): RawGestureDetector-[LabeledGlobalKey#e36d5] ← I/flutter (25161): _ScrollSemantics-[GlobalKey#e2845] ← RepaintBoundary ← ⋯ I/flutter (25161): parentData: paintOffset=Offset(0.0, 0.0) (can use size) I/flutter (25161): constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, I/flutter (25161): scrollOffset: 0.0, remainingPaintExtent: 596.7, crossAxisExtent: 360.0, crossAxisDirection: I/flutter (25161): AxisDirection.right, viewportMainAxisExtent: 596.7, remainingCacheExtent: 846.7 cacheOrigin: 0.0 ) I/flutter (25161): geometry: SliverGeometry(scrollExtent: 178.0, paintExtent: 360.0, maxPaintExtent: 178.0, I/flutter (25161): hasVisualOverflow: true, cacheExtent: 360.0) I/flutter (25161): currently live children: 0 to 1 I/flutter (25161): This RenderObject had the following descendants (showing up to depth 5): I/flutter (25161): RenderIndexedSemantics#04bae NEEDS-PAINT I/flutter (25161): RenderRepaintBoundary#af3ad NEEDS-PAINT I/flutter (25161): RenderSemanticsGestureHandler#a7dbb NEEDS-PAINT I/flutter (25161): RenderPointerListener#132a7 NEEDS-PAINT I/flutter (25161): RenderSemanticsAnnotations#ef278 NEEDS-PAINT I/flutter (25161): RenderIndexedSemantics#57f8f NEEDS-PAINT I/flutter (25161): RenderRepaintBoundary#f31a0 NEEDS-PAINT I/flutter (25161): RenderPadding#3867c NEEDS-PAINT I/flutter (25161): RenderPositionedBox#bb1ec NEEDS-PAINT I/flutter (25161): RenderFlex#48555 relayoutBoundary=up1 NEEDS-PAINT I/flutter (25161): ════════════════════════════════════════════════════════════════════════════════════════════════════ I/flutter (25161): App is in debug mode

    opened by rakeshlanjewar 3
  • Provide full working example for the plugin And proper documentation

    Provide full working example for the plugin And proper documentation

    Nice job On this plugin, but it will really help users get along if a full example is provided for the plugin and also if the parameter are well documented, thanks

    opened by asapJ 3
  • Support for retry all failed request

    Support for retry all failed request

    When I clicked on the refresh indicator on the error builder, it only retry the particular failed request. I suggest it should retry for all the failed request or at least add a flag to control that.

    opened by anderscheow 3
  • The method 'FlatButton' isn't defined for the class 'PagewiseState<T>'.

    The method 'FlatButton' isn't defined for the class 'PagewiseState'.

    Running Gradle task 'assembleDebug'...
    ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_pagewise-2.0.1/lib/flutter_pagewise.dart:312:30: Error: The method 'FlatButton' isn't defined for the class 'PagewiseState<T>'.
     - 'PagewiseState' is from 'package:flutter_pagewise/flutter_pagewise.dart' ('../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_pagewise-2.0.1/lib/flutter_pagewise.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
        var defaultRetryButton = FlatButton(
                                 ^^^^^^^^^^
    
    
    FAILURE: Build failed with an exception.
    
    * Where:
    Script '/Users/programmer/development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1159
    
    * What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.
    > Process 'command '/Users/programmer/development/flutter/bin/flutter'' finished with non-zero exit value 1
    
    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 36s
    Exception: Gradle task assembleDebug failed with exit code 1
    
    
    opened by thaliashospitality 0
  • Paginated scroll state not preserved

    Paginated scroll state not preserved

    The paginated list scroll state isn't preserved when I switch tabs (via bottomNavigationBar for example).

    I'm not sure if this is supported by the library or not.

    https://stackoverflow.com/questions/66297707/flutter-pagewise-library-does-not-preserve-page-scroll-state-on-tabbing-away

    opened by kelvinwatson 0
  • Allow dynamic pagesize

    Allow dynamic pagesize

    My projects fetches different pagesizes every call since it is user personalized, it would be helpful for many to make this possible. When the pagesize changes than indicated, the widget stops loading more.

    opened by anass-naoushi 0
Owner
Software Engineer Life-time Student
null
A lightweight and powerful batch library written in Dart

A lightweight and powerful batch library written in Dart. You can easily develop a job schedule and batch program in Dart with this library.

Kato Shinya 24 Dec 13, 2022
Z time ago - A simple Flutter z time ago package used to change date to time ago for english, arabic and kurdish languages

This package is used to get time duration from now and given time for kurdish, a

Zakarya Muhammad 2 May 19, 2022
I created a welcome page, login page and signup page using Flutter

welcome_page UI design for welcome page, signUp page & Login page by Joy Obor Getting Started This project is a starting point for a Flutter applicati

spyder 0 Dec 29, 2021
Flutter Download Manager is a Cross-Platform file downloader with Parallel and Batch Download support

Flutter Download Manager is a Cross-Platform file downloader with Parallel and Batch Download support. Manage download tasks by url and be notified of status and their progress. Pause, Cancel, Queue and Resume Downloads.

Nabil Mosharraf 11 Dec 17, 2022
A small library support load infinite for ListView - GridView on Flutter.

Paging A Flutter package that supports pagination(load infinite) for ListView, GridView Demo DataSource PageKeyedDataSource To create a PagingListView

Đặng Ngọc Đức 32 Dec 4, 2022
A platform for car sharing where users can book any car that suits their needs and wants for their intended journey, from the closest hosts in the community.

Getting Started This project is a starting point for a Flutter application. For help getting started with Flutter, view our online documentation, whic

Faisal Ramdan 28 Apr 29, 2022
It is a Mobile Application built with Flutter to help Instructors reach their students with the material needed for their course (Videos, PDFs, Exams)

Droos - Flutter Mobile Appliction It is a Mobile Application built with Flutter to help Instructors reach their students with the material needed for

Abdulrahman Emad 4 Oct 5, 2022
Google one tap sign in - Flutter Google One Tap Sign In (Android)

Google One Tap Sign In Google One Tap Sign In (Android) A Flutter Plugin for Goo

null 6 Nov 23, 2022
One Dungeon is a ​1-Bit-style platformer game that consists of one level

One Dungeon is a ​1-Bit-style platformer game that consists of one level. It developed during the Midyear 2022 Flame Game Jam.

Bulent Baris Kilic 6 Sep 21, 2022
Call Kit is a prebuilt feature-rich call component, which enables you to build one-on-one and group voice/video calls into your app with only a few lines of code.

Call Kit (ZegoUIKitPrebuiltCall) Call Kit is a prebuilt feature-rich call component, which enables you to build one-on-one and group voice/video calls

ZEGOCLOUD 9 Dec 26, 2022
A font loader to download, cache and load web fonts in flutter with support for Firebase Cloud Storage.

Dynamic Cached Fonts A simple, easy to use yet customizable font loader to use web fonts. Demo: https://sidrao2006.github.io/dynamic_cached_fonts ?? I

Aneesh Rao 18 Dec 21, 2022
A flutter widget that provides pull-down refresh and pull-up load.

flutter_easyrefresh English | 中文 正如名字一样,EasyRefresh很容易就能在Flutter应用上实现下拉刷新以及上拉加载操作,它支持几乎所有的Flutter控件。它的功能与Android的SmartRefreshLayout很相似,同样也吸取了很多三方库的优点。

KnoYo 3.4k Jan 8, 2023
Sangre - Sangre streams your backend queries in realtime to your clients minimizing the load via diffs

Sangre Sangre streams your backend queries in realtime to your clients minimizin

P.O.M 5 Nov 27, 2022
Flutter dynamically load translation in your app.

Flutter dynamically load translation in your app.

null 1 Apr 4, 2022
Simple flutter package to load and search string.

flutter_text_viewer flutter_text_viewer is a simple text viewer package to load and search text from assets,file. Demo Features Load text from assets/

Kunchok Tashi 3 Dec 15, 2022
A command-line application provide an load optimization solution for flutter web

一个命令行工具,针对flutter web加载慢和缓存问题提供了一套解决方案。 功能 通过大文件分片和资源文件cdn化方式,优化flutter web页面加载慢问题。 通过资源文件hash化,解决浏览器强缓存导致功能无法更新问题。 开始 局部安装 dev_dependencies: flutte

Barry 10 Dec 29, 2022
Flutter Control is complex library to maintain App and State management. Library merges multiple functionality under one hood. This approach helps to tidily bound separated logic into complex solution.

Flutter Control is complex library to maintain App and State management. Library merges multiple functionality under one hood. This approach helps to

Roman Hornak 23 Feb 23, 2022