-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#3455Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Description
According to https://github.com/flutter/packages/blob/4aa259aa4f21e2cf510e5fc7755fbd26175807f2/packages/pigeon/lib/swift_generator.dart#L711, Users don't seem to be able to pass int64 without converting to another type like int32 or double.
Example dart code:
import 'package:pigeon/pigeon.dart';
@FlutterApi()
abstract class Callback {
void onEvent(int timestampNs);
}generates following swift code:
/// Generated class from Pigeon that represents Flutter messages that can be called from Swift.
class Callback {
private let binaryMessenger: FlutterBinaryMessenger
init(binaryMessenger: FlutterBinaryMessenger){
self.binaryMessenger = binaryMessenger
}
func onEvent(timestampNs timestampNsArg: Int32, completion: @escaping () -> Void) {
let channel = FlutterBasicMessageChannel(name: "dev.flutter.pigeon.Callback.onEvent", binaryMessenger: binaryMessenger)
channel.sendMessage([timestampNsArg] as [Any?]) { _ in
completion()
}
}
}It would be nice to be able to pass int64 from Swift to Dart using pigeon.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.