Skip to content

Conversation

@ash2moon
Copy link
Contributor

@ash2moon ash2moon commented Apr 8, 2025

Resolves issue #165781 by falling back to reading preference as an int then upcasted to a Long.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changelog should be updated to follow the style guide

https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style

in particular using present tense. I also think it could be a bit more descriptive about what this fixes for users. Something like "Fixes a ClassCastException when using getInt to read a preference that was written on the native side.", if you think that accurately describes the fix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changelog should give some of the context for when this happens. Something like

Enables callers to use `getInt` to read preference of type `int` that was written to shared preferences by java/kotlin code without passing though plugin code. 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider a comment documenting when we expect this to happen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@ash2moon ash2moon added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 9, 2025
@auto-submit auto-submit bot merged commit 312f23f into flutter:main Apr 9, 2025
82 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Apr 9, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Apr 9, 2025
nick-llewellyn pushed a commit to labrystechnology/flutter_packages that referenced this pull request Apr 23, 2025
…165781 (flutter#9032)

Resolves issue [#165781](flutter/flutter#165781) by falling back to reading preference as an int then upcasted to a Long.

## Pre-Review Checklist

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
…165781 (flutter#9032)

Resolves issue [#165781](flutter/flutter#165781) by falling back to reading preference as an int then upcasted to a Long.

## Pre-Review Checklist

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
…165781 (flutter#9032)

Resolves issue [#165781](flutter/flutter#165781) by falling back to reading preference as an int then upcasted to a Long.

## Pre-Review Checklist

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
…165781 (flutter#9032)

Resolves issue [#165781](flutter/flutter#165781) by falling back to reading preference as an int then upcasted to a Long.

## Pre-Review Checklist

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: shared_preferences platform-android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants