emit method

  1. @override
void emit(
  1. Event event, {
  2. PheasantTemplate? templateState,
})
override

Function used to emit state changes in a PheasantTemplate object.

This function creates, emits and registers a StateChange by making use of event and templateState.

The function then registers the change and adds it to the Stream.

Implementation

@override
void emit(Event event, {PheasantTemplate? templateState}) {
  if (!_frozen) {
    StateChange<PheasantTemplate> change = StateChange(
        triggerEvent: event, newValue: templateState); // Set state change
    emitter.emit(); // Unimplemented yet
    // super.emit(event, templateState: templateState);
    _streamChange(templateState, change);
  }
}