triggers property

Set<SignalEdge> triggers

Provides synchronous access to info.

Throws a StateError when synchronous access is not possible. Synchronous access is possible when requested == true and no request / reconfiguration / release is going on right now.

When possible, info will return synchronously, but you have to cast it to LineInfo every time you want to use it, which is kinda annoying. This method does the casting for you. / _assertNotWriteLocked(); Returns a proxy providing strictly asynchronous access to the above getters.

You can't call Future.then or Future.whenComplete on the FutureOr values returned by info. This method constructs a Future out of the FutureOr returned by info. (regardless of the actual type of the FutureOr) Whether this line is requested (owned by you) right now.

requested == true means that you own the line, and can do things with it.

If requested == false then you can't do more than retrieve the line info using the info property. The signal edges that this line is listening on right now, or equivalently, the signal edges that will trigger a SignalEvent that can be retrieved by listening on GpioLine.onEvent.

The triggers can be specified when requesting the line with requestInput, but can not be changed using reconfigureInput when the line is already requested.

You can, of course, release the line and re-request it with different triggers if you need to, though.

Implementation

//  LineInfo get infoSync {
////    _assertNotWriteLocked();
//
//    /*if (!requested) {
//      throw StateError("Can't get line info because line "
//          "is not requested.");
//    }*/
//
//    return _info;
//  }

/// Returns a proxy providing strictly asynchronous access to the above getters.
///
/// You can't call [Future.then] or [Future.whenComplete] on the [FutureOr] values
/// returned by [info]. This method constructs a [Future] out of the [FutureOr]
/// returned by [info]. (regardless of the actual type of the [FutureOr])
//  LineInfo get infoAsync {
//    return _FlutterGpiodPlatformSide.getLineInfo(_lineHandle);
//  }

/// Whether this line is requested (owned by you) right now.
///
/// `requested == true` means that you own the line,
/// and can do things with it.
///
/// If `requested == false` then you can't do more
/// than retrieve the line info using the [info] property.
//  bool get requested {
//    _assertNotWriteLocked();
//    return _requested;
//  }

/// The signal edges that this line is listening on right now,
/// or equivalently, the signal edges that will trigger a [SignalEvent]
/// that can be retrieved by listening on [GpioLine.onEvent].
///
/// The triggers can be specified when requesting the line with [requestInput], but
/// can __not__ be changed using [reconfigureInput] when the line is already requested.
///
/// You can, of course, release the line and re-request it with
/// different triggers if you need to, though.
Set<SignalEdge> get triggers {
//    _assertNotWriteLocked();
  return Set.of(_triggers);
}