Skip to content

DID-9447: [QA-FLUTTER] Flutter wrapper integration - #29

Merged
arosasg merged 1 commit into
mainfrom
botinc/run-9eb99c58
Oct 30, 2026
Merged

arosasg merged 1 commit into
mainfrom
botinc/run-9eb99c58

Conversation

@botinc-agent

@botinc-agent botinc-agent Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Problem

When the caller did not set DiditConfig.languageCode, the wrapper forwarded only Locale.languageCode. The native SDKs name Simplified Chinese, Traditional Chinese and Brazilian Portuguese with their own codes, so a zh_TW or pt_BR device was sent to the generic zh/pt UI. The new test shows the old behavior (zh_TW -> zh).

Solution

  • Derive the device locale code in _deviceLanguageCode(): Hant/TW/HK/MO -> zh-TW, Hans/CN/SG -> zh-CN, pt_BR -> pt-BR, otherwise the two-letter language. An explicit languageCode still wins.
  • Mirror the change into the three generated variant packages.
  • Add test/wrapper_contract_test.dart, covering all configuration options on both entry points, the success, cancel and failure callbacks, and transaction callback routing.

Verification

  • The new locale test fails on the previous code (Expected: 'zh-TW', Actual: 'zh') and passes after the change.
  • flutter analyze (root and the three variants): no issues.
  • flutter test -r expanded: 39 tests pass (26 existing, 13 new).
  • flutter test in example: passes.
  • Not run here: iOS/Android builds (this Linux sandbox has no Xcode, Android SDK or JDK) and a staging journey (the native verification SDK targets production endpoints; only transactions accept a base URL).

@arosasg
arosasg merged commit 74a1539 into main Oct 30, 2026
3 of 4 checks passed
@arosasg
arosasg deleted the botinc/run-9eb99c58 branch October 30, 2026 21:34
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.

1 participant