Skip to content

[Bug]: TermsAndConditionsUIParams.mainTextColor does not apply to all text elements in consent dialog #604

@IvelinKrastev

Description

@IvelinKrastev

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

When using GoogleMapsNavigator.showTermsAndConditionsDialog() with custom TermsAndConditionsUIParams, the **mainTextColor** parameter does not apply to all text elements. Certain body text sections remain in a hardcoded color (black) rather than using the provided mainTextColor.

Image

Flutter version

3.38.7

Package version

0.8.2

Native SDK versions

  • I haven't changed the version of the native SDKs

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.38.7, on macOS 26.2 25C56 darwin-arm64, locale en-BG)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 26.2)
[✓] Chrome - develop for the web
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

Steps to reproduce

  1. Create a Flutter app with google_navigation_flutter package
  2. Configure dark-themed TermsAndConditionsUIParams (see code sample below)
  3. Call GoogleMapsNavigator.showTermsAndConditionsDialog() with the params
  4. Observe the consent dialog - some text is invisible (black on dark background)

Expected vs Actual Behavior

Expected Behavior

All body text in the terms and conditions dialog should use the mainTextColor (white in this example).

Actual Behavior

Only some text elements use mainTextColor. The following sections remain black, making them invisible on a dark background:

  • "How navigation data is used" section header and body
  • "When you use [App] Ltd., Google collects..." paragraph
  • "These updates to the map won't be associated..." paragraph
  • "How driver reports and edits are used" section header and body

Code Sample

final uiParams = TermsAndConditionsUIParams(
  backgroundColor: Colors.black,
  titleColor: Colors.white,
  mainTextColor: Colors.white,  // Should apply to all body text
  acceptButtonTextColor: Colors.blue,
  cancelButtonTextColor: Colors.grey,
);

await GoogleMapsNavigator.showTermsAndConditionsDialog(
  'App Title',
  'Company Name',
  uiParams: uiParams,
);

Additional Context

No response

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions