-
-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: merge MapInternalController
with MapControllerImpl
#1738
Conversation
I don't mind the name changes, but I would still recommend to create deprecated typedefs for the old names just to not instantly breaks code from the previous version and inform users that they should migrate to the new names, for example: @Deprecated('Use MapInteractiveViewer instead')
typedef FlutterMapInteractiveViewer = MapInteractiveViewer; |
Typedefs are a great idea for deprecations.👍🏼 Do we need to deprecate internal code though? 🤔 The renamed classes are not exported and therefore not directly exposed outside of the package. |
True if all classes are internal, no need for deprecation. I thought that some of them were exposed, but if it's not the case then don't bother 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's pretty much good (except for my point above) except for these couple of things.
IMO in general, I prefer to avoid changing names when it doesn't add clarity or better match what it's assigned to. But I realise that's just my personal way of doing things, so I won't let that block this.
Thanks for the links! In that case we should probably invite @rorystephenson to this discussion as well.
As far as I can tell this PR doesn't violates the principles mentioned in the other discussions. This pull request doesn't even breaks public APIs, it's all internal. The concept of two internal layers for the controller has indeed been introduced in #1551 but was not mentioned in the discussion. @rorystephenson, could you give some details about the design choice? I'm curious to hear what you think about this PR too, maybe I'm overlooking something here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're sure this isn't impacting any advanced use-cases where people might be implementing their own highly-specialised controller, I'm OK with this.
If this isn't breaking, does it need the ! in the title?
I'm quite confident here because of the changes made in #1551 (users don't extend from MapController but use it as parameter like
Oh, yes that's correct - changing it. |
MapInternalController
with MapControllerImpl
MapInternalController
with MapControllerImpl
4682a26
to
5fe0057
Compare
hi @JaffaKetchup I merged the master branch. |
I think it's all good if that's the only thing that's changed! |
Motivation
FlutterMapImpl
has become an internal object influtter_map
version 5. Since then there are currently two abstration levels of the map controller (MapController
->MapControllerImpl
->MapInternalController
).MapControllerImpl
calls its underlyingMapInternalController
and passes it's arguments though in addition to setting some defaults.Changes in this pull request
MapInternalController
withMapControllerImpl
FlutterMap
prefix, use a shorterMap
prefix insteadFlutterMapInteractiveViewer
toMapInteractiveViewer
FlutterMapNetworkImageProvider
toMapNetworkImageProvider
FlutterMapInheritedModel
toMapInheritedModel
Roadmap