createSubscription method

void createSubscription()

Implementation

void createSubscription() {
  subscription = widget.model.changes.listen((newEvent) {
    if (newEvent == oldEvent) return;

    setState(() {
      oldEvent = event;
      event = newEvent;
    });
  });
}