MOBILE-284: support shouldIncludeVersionCode parameter for init#207
Open
sergeysozinov wants to merge 2 commits into
Open
MOBILE-284: support shouldIncludeVersionCode parameter for init#207sergeysozinov wants to merge 2 commits into
sergeysozinov wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for a new shouldIncludeVersionCode initialization parameter in the Mindbox Flutter SDK configuration, ensuring it is sent over the method channel and applied on Android while remaining safely ignored on iOS.
Changes:
- Added
shouldIncludeVersionCode(defaulttrue) toConfigurationand included it inConfiguration.toMap(). - Updated the Android plugin to read
shouldIncludeVersionCodefrom init arguments (defaulting totrue) and pass it into the native configuration builder. - Added/extended unit tests to verify the default behavior and method-channel forwarding.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| mindbox_platform_interface/test/src/types/mindbox_method_handler_test.dart | Adds tests to verify init() forwards shouldIncludeVersionCode and that the default is true. |
| mindbox_platform_interface/test/src/types/configuration_test.dart | Adds tests for Configuration.shouldIncludeVersionCode defaulting and toMap() output. |
| mindbox_platform_interface/lib/src/types/configuration.dart | Introduces the new configuration field with documentation and ensures it’s serialized into the init argument map. |
| mindbox_android/android/src/main/kotlin/cloud/mindbox/mindbox_android/MindboxAndroidPlugin.kt | Reads shouldIncludeVersionCode from Flutter args (with safe default) and applies it to the Android SDK config builder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
enotniy
approved these changes
Jul 22, 2026
| val subscribeIfCreated: Boolean = args["subscribeCustomerIfCreated"] as Boolean | ||
| val shouldCreateCustomer: Boolean = args["shouldCreateCustomer"] as Boolean | ||
| val operationsDomainArg: String = args["operationsDomain"] as? String ?: "" | ||
| val shouldIncludeVersionCode: Boolean = args["shouldIncludeVersionCode"] as? Boolean ?: true |
Collaborator
There was a problem hiding this comment.
А можно не передавать default?
В нативе выставился, то что нужно.
Чтобы при смене не пришлось тут делать изменения.
enotniy
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://tracker.yandex.ru/MOBILE-284