NarrativeInterpreter constructor

NarrativeInterpreter({
  1. required NarrativeEngine engine,
  2. Future<void> onRead(
    1. String text
    )?,
  3. Future<void> onWrite(
    1. BaseNarrativeModel sentence
    )?,
  4. Future<void> onAsk(
    1. BaseNarrativeModel sentence
    )?,
  5. Future<void> onNavigate(
    1. BaseNarrativeModel sentence
    )?,
  6. Future<void> onWait(
    1. BaseNarrativeModel sentence
    )?,
  7. Future<void> onUnhandled(
    1. BaseNarrativeModel sentence
    )?,
})

Constructor with injected behavior handlers.

Implementation

NarrativeInterpreter({
  required this.engine,
  this.onRead,
  this.onWrite,
  this.onAsk,
  this.onNavigate,
  this.onWait,
  this.onUnhandled,
});