Skip to content

Commit

Permalink
linux_spidev: fix invalid type in isolate message
Browse files Browse the repository at this point in the history
  • Loading branch information
ardera committed May 1, 2024
1 parent 47bb31b commit 973e49e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/linux_spidev/lib/src/spidev.dart
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ void spiTransferExecutorEntry(Tuple2<int, SendPort> channel) async {

sendPort.send(Tuple3<int, dynamic, StackTrace?>(transferId, null, null));
} on OSError catch (e) {
sendPort.send(Tuple3<int, dynamic, StackTrace>(transferId, e, StackTrace.current));
sendPort.send(Tuple3<int, dynamic, StackTrace?>(transferId, e, StackTrace.current));
}
} else {
throw StateError("Invalid packet received from receivePort in SpiTransferExecutor isolate: $untypedTransfer");
Expand Down Expand Up @@ -463,7 +463,7 @@ class SpiTransferExecutor {
int _nextTransferId = 0;

void _onIsolateData(dynamic untypedData) {
final data = untypedData as Tuple3<int, dynamic, StackTrace>;
final data = untypedData as Tuple3<int, dynamic, StackTrace?>;

final transferId = data.item1;
final error = data.item2;
Expand Down

0 comments on commit 973e49e

Please sign in to comment.