executeMethod method Null safety

Future<State> executeMethod(
  1. Stream<State> processFn(
      ),
    1. String processName
    )

    Implementation

    Future<State> executeMethod(
      Stream<State> Function() processFn,
      String processName,
    ) async {
      final event = BlopEvent(processFn, processName);
      final completeFuture = completerStrategy.waitComplete(event);
    
      // register first and after that fire event
      add(event as Event);
    
      await completeFuture;
    
      return state;
    }