Skip to content

Add the shared_preferences_tools extension to the shared_preferences package #145433

Closed

Description

@kenzieschmoll

A DevTools extension for the shared_preferences package has been published as package:shared_preferences_tools: https://pub.dev/packages/shared_preferences_tools.

To bring the most value to users of the shared_preferences package, we should consider moving this extension into the package it is intended to be used with (package:shared_preferences).

Accompanying issue on the shared_preferences_tools repo: adsonpleal/shared_preferences_tools#2

Activity

  1. added
    in triagePresently being triaged by the triage team
    c: new featureNothing broken; request for a new capability
    p: shared_preferencesPlugin to read and write Shared Preferences
    packageflutter/packages repository. See also p: labels.
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on Mar 20, 2024
  2. stuartmorgan-g commented on Mar 21, 2024

    @stuartmorgan-g
    Contributor

    I'm not very familiar with the extension structure; I assume this would be both https://github.com/adsonpleal/shared_preferences_tools/tree/main/packages/shared_preferences_tools and https://github.com/adsonpleal/shared_preferences_tools/tree/main/packages/shared_preferences_tools_devtools_extension? The latter has some significant third-party dependencies.

  3. kenzieschmoll commented on Mar 21, 2024

    @kenzieschmoll
    MemberAuthor

    DevTools extension docs: https://pub.dev/packages/devtools_extensions.

    For a package to provide a DevTools extension, it needs the following content:

    package_foo/
      extension/
        devtools/
          build/  # precompiled assets of the extension flutter web app
          config.yaml. # configuration file that tells DevTools how to display the extension
    

    So for shared_preferences to provide a DevTools extension, only the pre-compiled Flutter web app for (https://github.com/adsonpleal/shared_preferences_tools/tree/main/packages/shared_preferences_tools_devtools_extension) would need to be included in shared_preferences/extension/devtools/build, not the source code itself. That being said, we would still want to review the code before shipping the extension with a first party package.

    Developing the source code outside of the flutter/packages repo could make this a bit odd to maintain, so we may want to bring the source code into this repo as well, even if we don't publish it or roll it into google3.

    Is the concern about bringing new dependencies into the Flutter SDK that are not allowed? This wouldn't be an issue since shared_preferences_tools_devtools_extension would not be published nor depended upon by any other package.

  4. stuartmorgan-g commented on Mar 21, 2024

    @stuartmorgan-g
    Contributor

    Developing the source code outside of the flutter/packages repo could make this a bit odd to maintain, so we may want to bring the source code into this repo as well, even if we don't publish it or roll it into google3.

    I would definitely not want to be shipping precompiled output of code that we don't control. That has significant chain of trust and maintainability issues.

    Is the concern about bringing new dependencies into the Flutter SDK that are not allowed? This wouldn't be an issue since shared_preferences_tools_devtools_extension would not be published nor depended upon by any other package.

    https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#dependencies summarizes the concerns with dependencies in flutter/packages.

  5. stuartmorgan-g commented on Apr 2, 2024

    @stuartmorgan-g
    Contributor

    I think the next steps here would be:

    1. confirmation that the author would be interested in doing this, and
    2. if so, a discussion of how plausible removing some third-party dependencies would be.
  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Apr 2, 2024
  7. github-actions commented on Apr 23, 2024

    @github-actions

    Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
    If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
    Thanks for your contribution.

  8. github-actions commented on May 7, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. 8 remaining items

  10. adsonpleal commented on May 15, 2024

    @adsonpleal

    No worries, I can just use flutter/dart packages. Soon I'll open a PR and ping you and @kenzieschmoll.

  11. adsonpleal commented on May 16, 2024

    @adsonpleal

    @kenzieschmoll I've finished the work of adding the extension directly to the shared_preferences package. I'm just doing some small polishings and I'll open a PR.

    But I think I've found a bug for web targets, I've opened a new issue in the devtools repo.

  12. added
    P2Important issues not at the top of the work list
    on May 21, 2024
  13. adsonpleal commented on Jan 30, 2025

    @adsonpleal

    @kenzieschmoll now that flutter/packages#8531 has finally landed and this is available in shared_preferences 2.5.0 we can close this issue.

  14. kenzieschmoll commented on Jan 30, 2025

    @kenzieschmoll
    MemberAuthor

    Thank you for all your work to make this happen! @adsonpleal @stuartmorgan @tarrinneal

  15. github-actions commented on Feb 14, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  16. locked as resolved and limited conversation to collaborators on Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: shared_preferencesPlugin to read and write Shared Preferencespackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions