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

[Desktop]Can not get onObserve callback #12

Closed
liangsmfish opened this issue Nov 9, 2022 · 1 comment
Closed

[Desktop]Can not get onObserve callback #12

liangsmfish opened this issue Nov 9, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@liangsmfish
Copy link

Env: Flutter 3.3.6
This is my code:

  Widget getContinuousThumbnailItem(WidgetRef ref) {
    Widget builder = ListView.builder(
        itemExtent: ctWidth,
        controller: scrollController,
        scrollDirection: Axis.horizontal,
        itemCount: getCTDisplayCount(ref),
        itemBuilder: (context, i) {
          return ContinuousThumbnailItem(
            width: ctWidth,
            height: ctHeight,
            index: i,
          );
        });
    builder = ListViewObserver(
      child: builder,
      onObserve: (resultModel) {
        print('firstChild.index -- ${resultModel.firstChild?.index}');
        print('displaying -- ${resultModel.displayingChildIndexList}');
      },
    );

    return builder;
  }

It seems that onObserve is not callback

@liangsmfish liangsmfish changed the title Can not get onObserve callback [Desktop]Can not get onObserve callback Nov 9, 2022
@LinXunFeng LinXunFeng added the bug Something isn't working label Nov 9, 2022
@LinXunFeng
Copy link
Member

Thanks for your feedback, please update to version 1.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants