flutter_carousel_slider icon indicating copy to clipboard operation
flutter_carousel_slider copied to clipboard

The getter 'options' was called on null.

Open volgin opened this issue 5 years ago • 6 comments
trafficstars

The following exception was reported by one of our user's devices:

NoSuchMethodError: The getter 'options' was called on null.
Receiver: null
Tried calling: options

carousel_controller.dart in CarouselControllerImpl.animateToPage at line 106

volgin avatar Nov 19 '20 15:11 volgin

I'm having the same problem, I hope they can help us with this soon

abdurahmanshiine avatar Nov 29 '20 06:11 abdurahmanshiine

I'm having the same problem when using custom controller

mhorizon avatar Dec 06 '20 21:12 mhorizon

it appears only if you do reloads, otherwise working okay

SirBarksALot avatar Jan 15 '21 22:01 SirBarksALot

it appears only if you do reloads, otherwise working okay

Thanks for this

It turns out I defined my options variable inside a function that was returning the carousel widget, so whenever it gets re-rendered it would throw that error, so I fixed it by simply globalizing the variable initialization.. hope this helps

abdurahmanshiine avatar Jan 16 '21 04:01 abdurahmanshiine

it appears only if you do reloads, otherwise working okay

Thanks for this

It turns out I defined my options variable inside a function that was returning the carousel widget, so whenever it gets re-rendered it would give that problem, so I fixed it by simply globalizing the variable initialization.. hope this helps

Thanks a lot @abdurahman-shiine I did the same and it works well.

LinusMuema avatar Apr 07 '21 10:04 LinusMuema

it appears only if you do reloads, otherwise working okay

Thanks for this

It turns out I defined my options variable inside a function that was returning the carousel widget, so whenever it gets re-rendered it would throw that error, so I fixed it by simply globalizing the variable initialization.. hope this helps

Can you show a little more of your idea in practice? I couldn't reproduce.

felipecastrosales avatar Sep 27 '22 18:09 felipecastrosales