mapbox / mapbox/mapbox-maps-flutter

Make the iconColor property for the attribution icon work

Open
#134 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
380
Forks
204
PR merge metrics
No merged PRs in 30d

Description

I would like to change the icon color of the attribution icon from default blue to white to match my app theming.

Setting the iconColor like this does not seem to work as of now:

controller.attribution.updateSettings(
  AttributionSettings(
    iconColor: Colors.white.value,
  ),
)

I found this comment in the tests:

// FIXME colors are decoded incorrectly for some reason
// expect(updatedSettings.iconColor, Colors.blue.value);

Edit: It works on Android but not on iOS.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attribution.updateSettings call and the test containing the FIXME about incorrectly decoded colors. Compare the Android and iOS attribution implementations to trace why iconColor differs on iOS. Done means the requested white icon color is applied on iOS and the related color assertion can be enabled successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.