Describe the Bug
A clear and concise description of what the bug is.
If it's not a bug, please leave a discussion instead of an issue.
To Reproduce
Using this rust enum
#[derive(Debug, Serialize, RustSignal, PartialEq)]
pub enum BleConnectionStatus {
Init,
Scanning,
Connected,
}
rinf gen generate the code using dart extension (i assume using serde-reflection)
extension BleConnectionStatusExtension on BleConnectionStatus {
...
static BleConnectionStatus bincodeDeserialize(Uint8List input) {
...
}
}
But on signal_handlers.dart
final assignRustSignal = <String, void Function(Uint8List, Uint8List)>{
'BleConnectionStatus': (Uint8List messageBytes, Uint8List binary) {
final message = BleConnectionStatus.bincodeDeserialize(messageBytes);
final rustSignal = RustSignalPack(
message,
binary,
);
_bleConnectionStatusStreamController.add(rustSignal);
BleConnectionStatus.latestRustSignal = rustSignal;
},
};
I got
ERROR: lib/src/bindings/signals/signal_handlers.dart:5:41: Error: Enums can't be instantiated.
ERROR: final message = BleConnectionStatus.bincodeDeserialize(messageBytes);
ERROR: ^^^^^^^^^^^^^^^^^^
ERROR: lib/src/bindings/signals/signal_handlers.dart:11:25: Error: Setter not found: 'latestRustSignal'.
ERROR: BleConnectionStatus.latestRustSignal = rustSignal;
ERROR: ^^^^^^^^^^^^^^^^
If i replace and comment the following it builds and works
// this
final message = BleConnectionStatus.bincodeDeserialize(messageBytes);
// to
final message = BleConnectionStatusExtension.bincodeDeserialize(messageBytes);
// comment out
// BleConnectionStatus.latestRustSignal = rustSignal;
Expected Behavior
Be able to compile
Additional Context
Output from the command below, shown in a Markdown code block.
rustc --version
rustc 1.94.0-nightly (2850ca829 2026-01-13)
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.38.9, on Arch Linux 6.18.7-arch1-1, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✓] Connected device (1 available)
[✓] Network resources
! Doctor found issues in 1 category.
Describe the Bug
A clear and concise description of what the bug is.
If it's not a bug, please leave a discussion instead of an issue.
To Reproduce
Using this rust enum
rinf gengenerate the code using dart extension (i assume using serde-reflection)But on signal_handlers.dart
I got
If i replace and comment the following it builds and works
Expected Behavior
Be able to compile
Additional Context
Output from the command below, shown in a Markdown code block.