onInitialize method

  1. @override
bool onInitialize()
override

Called by initialize. Returns true if successfully initialized.

If false, the executor stays in ExecutorState.Created. This is a synchronous method and must be light-weight.

Implementation

@override
bool onInitialize() {
  _bufferingStream = Light().lightSensorStream;
  return true;
}