Skip to content

Commit

Permalink
Merge pull request #373 from hnvn/master
Browse files Browse the repository at this point in the history
[Web] fix QRCode data type
  • Loading branch information
RodrigoSMarques authored Aug 29, 2024
2 parents dcaf81b + 7fbb000 commit af14c9d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/src/flutter_branch_sdk_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ class FlutterBranchSdkWeb extends FlutterBranchSdkPlatform {
(JSAny? err, QrCodeData? qrCode) {
if (err == null) {
if (qrCode != null) {
responseCompleter.complete(
BranchResponse.success(result: qrCode.rawBuffer.toDart));
responseCompleter.complete(BranchResponse.success(
result: qrCode.rawBuffer.toDart.asUint8List()));
} else {
responseCompleter.complete(BranchResponse.error(
errorCode: '-1', errorMessage: 'Qrcode generate error'));
Expand Down
2 changes: 1 addition & 1 deletion lib/src/web/branch_js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ external JSAny browserPrompt(String message, [String data]);
@JS()
@anonymous
extension type QrCodeData._(JSObject _) implements JSObject {
external JSUint8Array rawBuffer;
external JSArrayBuffer rawBuffer;
external JSFunction base64();
}

Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ homepage: https://github.com/RodrigoSMarques/flutter_branch_sdk

environment:
sdk: ">=3.3.0 <4.0.0"
flutter: ">=3.3.0"

dependencies:
flutter:
Expand Down

1 comment on commit af14c9d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.