Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveList.options not working with NotificationListener #482

Open
jiharal opened this issue Feb 6, 2024 · 0 comments
Open

LiveList.options not working with NotificationListener #482

jiharal opened this issue Feb 6, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jiharal
Copy link

jiharal commented Feb 6, 2024

here's the code

NotificationListener<ScrollNotification>(
                  onNotification: (notif) {
                    printInfo(info: notif.metrics.pixels.toString());
                    printInfo(info: notif.metrics.maxScrollExtent.toString());
                    if (notif.metrics.pixels >=
                        notif.metrics.maxScrollExtent - 200) {
                      if (kDebugMode) {
                        print('load more data');
                      }
                      loadItems(memberId: widget.memberId);
                    }
                    return false;
                  },
                  child: dataCtr.items.isEmpty
                      ? const Center(
                          child: AutoSizeText('tidak ada penjualan'),
                        )
                      : Expanded(
                          child: LiveList.options(
                            options: const LiveOptions(
                              // Start animation after (default zero)
                              delay: Duration(microseconds: 300),

                              // Show each item through (default 250)
                              showItemInterval: Duration(milliseconds: 100),

                              // Animation duration (default 250)
                              showItemDuration: Duration(milliseconds: 500),

                              // Animations starts at 0.05 visible
                              // item fraction in sight (default 0.025)
                              visibleFraction: 0.05,
                            ),
                            itemCount: dataCtr.items.length,
                            itemBuilder: (context, index, animation) {
                              var sale = dataCtr.items[index].data()!;
                              return FadeTransition(
                                  opacity: Tween<double>(
                                    begin: 0,
                                    end: 1,
                                  ).animate(animation),
                                  child: detailItems(sale));
                            },
                          ),
                        ),
                ),
                ```
@jiharal jiharal added the enhancement New feature or request label Feb 6, 2024
@jiharal jiharal changed the title NotificationListener not working with LiveList.options! LiveList.options not working with NotificationListener Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants