Skip to content

Rename XTypeGroup's macUTIs #103743

Closed
flutter/packages
#3888

Description

@stuartmorgan-g

We have a field called macUTIs, but it will be used for iOS too. We should rename it, with aliases (using get and set) to preserve backward compatibility.

Activity

  1. juandausa commented on Sep 14, 2022

    @juandausa

    Hi @stuartmorgan, I was looking into starting contributing a bit to the project.
    We looked into the code and discovered that both the Mac and iOS implementation use the property macUTIs. We modified the main example to include this field, and it's currently working on the different platforms.

    Furthermore, we believe that changing macUTIs to cupertinoUTIs would be a good replacement but, it will generate a breaking change. Can you elaborate on the way you proposed to preserve backward compatibility?

    Thanks,

  2. stuartmorgan-g commented on Sep 14, 2022

    @stuartmorgan-g
    ContributorAuthor

    Furthermore, we believe that changing macUTIs to cupertinoUTIs would be a good replacement

    cupertino is a confusing term in many contexts, and in the framework it explicitly means "iOS" not "iOS and macOS", so I definitely don't want to use it here. We should just call it uniformTypeIdentifiers, since that's an unambiguous term.

    Can you elaborate on the way you proposed to preserve backward compatibility?

    macUTIs can be left as a synthetic property that forwards to the new name. I.e., a construction like:

    class Foo {
      bool foo = false;
      bool get bar => foo;
      set bar(bool value) { foo = value; }
    }
    

    Once that's published and file_selector has been updated to use the new names, the old name can be @Deprecated.

  3. juandausa commented on Sep 14, 2022

    @juandausa

    Hi @stuartmorgan we appreciate your prompt response and clarification, we'll take this approach.

  4. github-actions commented on May 17, 2023

    @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.

  5. locked as resolved and limited conversation to collaborators on May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Important issues not at the top of the work listp: file_selectorThe file_selector pluginpackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions