Skip to content

[flutter_gpiod] requestInput(triggers: ...) is ignored — always requests both edges #52

Description

@pi-equals3

In flutter_gpiod version 0.6.0, the following code seems to trigger on both edges:

gpioLine.requestInput(
          consumer: consumer,
          triggers: const {SignalEdge.falling},
          bias: gpioBias);
gpioLine.onEvent.listen((_) => onEvent());

A quick analysis by Claude blames the == comparison in gpiod.dart:552-556.

My current workaround is to add a .where((event) => event.edge == SignalEdge.falling) before the .listen for anyone experiencing the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions