Skip to content

null safety on scrollable_positioned_list-0.3.6 #468

Open
@oopses

Description

@oopses

Flutter version: 3.3.1
scrollable_positioned_list-0.3.6

0.3.6 An error was reported during compilation:

/usr/local/flutter/.pub-cache/hosted/pub.dartlang.org/scrollable_positioned_list-0.3.6/lib/src/scrollable_positioned_list.dart:278:61: Error: Method 'readState' cannot be called on 'PageStorageBucket?' because it is potentially null.
 - 'PageStorageBucket' is from 'package:flutter/src/widgets/page_storage.dart' ('/usr/local/flutter/packages/flutter/lib/src/widgets/page_storage.dart').
[        ] Try calling using ?. instead.
[        ]     ItemPosition? initialPosition = PageStorage.of(context).readState(context);
[        ]                                                             ^^^^^^^^^
[   +1 ms] /usr/local/flutter/.pub-cache/hosted/pub.dartlang.org/scrollable_positioned_list-0.3.6/lib/src/scrollable_positioned_list.dart:577:31: Error: Method 'writeState' cannot be called on 'PageStorageBucket?' because it is potentially null.
[        ]  - 'PageStorageBucket' is from 'package:flutter/src/widgets/page_storage.dart' ('/usr/local/flutter/packages/flutter/lib/src/widgets/page_storage.dart').
[        ] Try calling using ?. instead.
[        ]       PageStorage.of(context).writeState(
[        ]                               ^^^^^^^^^^
[   +3 ms] Target kernel_snapshot failed: Exception

Currently fix the version to 0.3.5 normally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions