flutter_carousel_widget
flutter_carousel_widget copied to clipboard
Error: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null
I'm using Flutter 3.3.8v
Full error is:
../../development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_carousel_widget-2.0.2/lib/src/_flutter_carousel_widget.dart:368:22: Error: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null.
- 'PageStorageBucket' is from 'package:flutter/src/widgets/page_storage.dart' ('../../development/flutter/packages/flutter/lib/src/widgets/page_storage.dart').
Try calling using ?. instead.
.readState(storageContext) as double?;
^^^^^^^^^
Looks like the solution is easy, but not sure if compatible with older versions of flutter.
Hi @xAlstrat,
Which package version are you using?
Thanks Nikhil
I came here for the same problem, since yesterday this issue is happening
using the version 2.0.2
okay, let me check the issue.
I'm using Flutter 3.3.9v Hi there I faced the same issue at flutter_carousel_widget: ^2.0.2. Kindly tell me the solution
Hey,
Either upgrade Flutter to the latest version or downgrade the package version to 2.0.1
Thanks
Hi there,
Issue still persists with downgrade to 2.0.0 and 2.0.1 Any other ideas?
Regards,
Hi there,
Issue still persists with downgrade to 2.0.0 and 2.0.1 Any other ideas?
Regards,
Hi there,
Solution is to upgrade Flutter, run flutter upgrade in any terminal
Thanks