Unact / yandex_mapkit

Flutter implementation of YandexMapkit
MIT License
134 stars 149 forks source link

How to activate dark mode? #57

Closed kostyanchikoff closed 4 years ago

kostyanchikoff commented 4 years ago

Android yandex map kit has isNigthMode function which activates dark theme, what is the alternative here? Thank you in advance!

DCrow commented 4 years ago

Hello!

Currently this feature is not implemented. If anyone is willing to implement it, I am always happy to review it and include it in the library.

DCrow commented 4 years ago

This is now implemented in master branch.

You can enable night mode the following way

YandexMap(
  onMapCreated: (YandexMapController yandexMapController) async {
    await yandexMapController.toggleNightMode(enabled: true);
  }
)
rexolion commented 1 year ago

@DCrow Hello! Sorry, I cannot access the toggleNightMode method. Has it been removed?

DCrow commented 1 year ago

@rexolion In newer versions it's available like so

YandexMap(
  nightModeEnabled: true
)
rexolion commented 1 year ago

@DCrow Thank you for the quick answer!