RodrigoSMarques / flutter_branch_sdk

Flutter Plugin for create deep link using Branch Metrics SDK. This plugin provides a cross-platform (iOS, Android, Web).
https://branch.io
MIT License
101 stars 91 forks source link

Migrate web implementation to js_interop #364

Closed hnvn closed 3 months ago

hnvn commented 3 months ago
RodrigoSMarques commented 3 months ago

Thanks for the contribution. I will analyze it.

hnvn commented 3 months ago

Hi @RodrigoSMarques , please have a look at this PR when you are available. Thank you in advance

RodrigoSMarques commented 3 months ago

Hi @RodrigoSMarques , please have a look at this PR when you are available. Thank you in advance

I've already checked the PR. I'll approve it here.

Just evaluating the change of the minimum SDK to run the package.

RodrigoSMarques commented 3 months ago

@hnvn Performing tests, I identified that the QR Code generation function is not working. Can you check? I will release the release after adjusting this.

hnvn commented 3 months ago

Yeah, please guide me how to test it

RodrigoSMarques commented 3 months ago

I'm running the sample app.

https://flutter-branch-sdk.netlify.app

Click on the "Generate QRCode" option

image

DartError: TypeError: Instance of 'NativeByteBuffer': type 'NativeByteBuffer' is not a subtype of type 'NativeUint8List'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 296:3     throw_
dart-sdk/lib/_internal/js_shared/lib/rti.dart 1405:3                            _failedAsCheck
dart-sdk/lib/_internal/js_shared/lib/rti.dart 1383:3                            _generalAsCheckImplementation
dart-sdk/lib/_internal/js_shared/lib/js_util_patch.dart 81:5                    getProperty
packages/flutter_branch_sdk/src/flutter_branch_sdk_web.dart 432:59              <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart 201:30  _callDartFunctionFast2
https://cdn.branch.io/branch-latest.min.js 132:325                              g
https://cdn.branch.io/branch-latest.min.js 151:466                              <fn>
https://cdn.branch.io/branch-latest.min.js 136:26                               <fn>
https://cdn.branch.io/branch-latest.min.js 68:270                               m
https://cdn.branch.io/branch-latest.min.js 67:4                                 onreadystatechange