tapHandler method

  1. @override
Future<void> tapHandler(
  1. int taps
)
override

abstract method that must be implemented by the class mixing in frame_vision_app to capture a photo and perform some action on a 1-, 2-, 3-, n-tap etc.

Implementation

@override
Future<void> tapHandler(int taps) async {
  switch (taps) {
    case 1:
      // next
      break;
    case 2:
      // prev
      break;
    case 3:
      // check if there's processing in progress already and drop the request if so
      if (!_processing) {
        _processing = true;
        // start new vision capture
        // asynchronously kick off the capture/processing pipeline
        capture().then(process);
      }
      break;
    default:
  }
}