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

PagewiseGridView abnormal exita #92

Open
dufei816 opened this issue Sep 27, 2020 · 0 comments
Open

PagewiseGridView abnormal exita #92

dufei816 opened this issue Sep 27, 2020 · 0 comments

Comments

@dufei816
Copy link

PagewiseGridView.count
Android/IOS
Fast sliding app abnormal exita

---------------------------------code----------------------------------------

RefreshIndicator(
          onRefresh: () async {
            Provider.of<MaterialCategoryViewModel>(context, listen: false).refresh();
            controller.reset();
          },
          child: Consumer<bool>(builder: (_, data, __) {
            if (data) {
              return EmptyWidget(
                content: 'not item',
              );
            } else {
              return PagewiseGridView<MaterialItem>.count(
                addAutomaticKeepAlives: false,
                pageLoadController: controller,
                loadingBuilder: (_){
                  return Column(
                    children: [
                      Padding(
                        padding: EdgeInsets.only(top: 26.h),
                        child: CircularProgressIndicator(),
                      ),
                    ],
                  );
                },
                crossAxisSpacing: 20.w,
                mainAxisSpacing: 20.w,
                childAspectRatio: 1,
                crossAxisCount: 2,
                itemBuilder: (context, entity, index) {
                  return InkWell(
                    onTap: () {
                      Navigator.of(context).pushNamed(Routes.material_detail, arguments: entity.id);
                    },
                    child: Container(
                      child: CachedNetworkImage(
                        imageUrl: ImageUrlUtil.getUrl(entity.cover),
                        fit: BoxFit.cover,
                      ),
                    ),
                  );
                },
              );
            }
          }),
        );
@dufei816 dufei816 changed the title PagewiseGridView PagewiseGridView abnormal exita Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant