Skip to content

feat: add ExpandableAttributionLayer - #2305

Merged
JaffaKetchup merged 19 commits into
masterfrom
attribution-improvements
Nov 25, 2026
Merged

JaffaKetchup merged 19 commits into
masterfrom
attribution-improvements

Conversation

@JaffaKetchup

@JaffaKetchup JaffaKetchup commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Fixes #2262 & fixes #2143.

Also fixes some bugs in SimpleAttributionLayer around styling not being dynamic enough.

This deprecates RichAttributionLayer. The new layer is not a direct replacement - but is close. No more SourceAttributions, the user now needs to make the Text.rich themselves - but we'll provide an example.

From v9, when we remove RichAttributionLayer, we will also remove our logo from our package assets - we no longer provide the option to attribute flutter_map directly.

(ignore the dropped frames at the start, that's the recording not the app)

Recording.2026-11-24.010021.mp4

@JaffaKetchup JaffaKetchup linked an issue Nov 23, 2026 that may be closed by this pull request
@JaffaKetchup JaffaKetchup changed the title feat: add improved RichAttributionLayer feat: add ExpandableAttributionLayer Nov 23, 2026
Align button to bottom when expanded attribution is multi-line
Shrink default attribution text size to 13
@JaffaKetchup
JaffaKetchup force-pushed the attribution-improvements branch from 2450e7a to 6351669 Compare November 23, 2026 23:50
@JaffaKetchup
JaffaKetchup marked this pull request as ready for review November 24, 2026 01:08
@JaffaKetchup
JaffaKetchup requested a review from a team November 24, 2026 01:08
@JaffaKetchup

Copy link
Copy Markdown
Member Author

So the approach I chose specifically meant we wouldn't have to depend on Material. To do this, I used RawTooltip as the default implementation of a tooltip.

What I didn't realise is that this is only available since Flutter 3.41.0, being introduced in flutter/flutter@6679464. That means this doesn't currently maintain backwards compatibility to Flutter 3.27.

I'm reluctant to bump up to Flutter 3.41 for this release. We should keep this release as nice as possible so any of our users on really old projects at least get the update. But I'm not sure whether there's any point worrying over that.

There's 3 options:

@josxha josxha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There appear to be some compile errors on Flutter 3.41 🤔

@JaffaKetchup

JaffaKetchup commented Nov 24, 2026 •

Copy link
Copy Markdown
Member Author

@josxha Literally just fixed those at the same time you commented lol. Thought SizeTransition.alignment was added in 3.41 given it replaces something deprecated in v3.41.0-1.0.pre, but no, it's Flutter 3.44. I've just ignored the deprecation for now, we'll fix it when upgrading to Flutter 3.50.

@josxha josxha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think making the package invariant of any ui library like material is a really good direction👍

Comment thread lib/src/gestures/map_events.dart Resolved
@JaffaKetchup
JaffaKetchup requested review from a team and josxha November 24, 2026 23:52

@josxha josxha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looking good!

@JaffaKetchup
JaffaKetchup merged commit 56a78e7 into master Nov 25, 2026
11 checks passed
@JaffaKetchup
JaffaKetchup deleted the attribution-improvements branch November 25, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add new 'expandable' attribution layer Attribution widget contains a safe area

2 participants