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

card_swiper EXCEPTION: _CastError was thrown while dispatching notifications for SwiperController #13

Open
siva-rajendran opened this issue Mar 3, 2022 · 3 comments

Comments

@siva-rajendran
Copy link

siva-rajendran commented Mar 3, 2022

Case:

I am getting this error when my swiper scaffold is in app background.

[*] I am using smooth_page_indicator for showing custom dots pagination

Initially i load the main page (which has the swiper) based on conditions i move to some other page, in the background i am getting these errors/exceptions. Only when swiper is in background of flutter app i get this kind of exception.

Any idea to solve !!!

Error: Null check operator used on a null value

Exception Caught:

======== Exception caught by foundation library ====================================================
The following _CastError was thrown while dispatching notifications for SwiperController:
Null check operator used on a null value

When the exception was thrown, this was the stack:
#0 ScrollPosition.viewportDimension (package:flutter/src/widgets/scroll_position.dart:175:53)
#1 _PagePosition.getPixelsFromPage (package:flutter/src/widgets/page_view.dart:396:19)
#2 PageController.animateToPage (package:flutter/src/widgets/page_view.dart:202:16)
#3 _TransformerPageViewState.onChangeNotifier (package:card_swiper/src/transformer_page_view/transformer_page_view.dart:576:14)
#4 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:308:24)
#5 IndexController.next (package:card_swiper/src/transformer_page_view/index_controller.dart:110:5)
#6 _SwiperTimerMixin._onTimer (package:card_swiper/src/swiper.dart:388:17)
(elided 10 frames from class _RawReceivePortImpl, class _Timer, and dart:async)
The SwiperController sending notification was: Instance of 'SwiperController'

@ling9400
Copy link

+1

2 similar comments
@osReilly
Copy link

+1

@baseSky
Copy link

baseSky commented May 10, 2022

+1

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

4 participants