updateShouldNotifyDependent method

  1. @override
bool updateShouldNotifyDependent(
  1. covariant CallClientState oldWidget,
  2. Set<CallClientStateAspect> dependencies
)
override

Return true if the changes between this model and oldWidget match any of the dependencies.

Implementation

@override
bool updateShouldNotifyDependent(CallClientState oldWidget, Set<CallClientStateAspect> dependencies) =>
    dependencies.any((element) {
      switch (element) {
        case CallClientStateAspect.activeSpeaker:
          return activeSpeaker != oldWidget.activeSpeaker;
        case CallClientStateAspect.callState:
          return callState != oldWidget.callState;
        case CallClientStateAspect.inputs:
          return inputs != oldWidget.inputs;
        case CallClientStateAspect.participants:
          return participants != oldWidget.participants;
        case CallClientStateAspect.publishing:
          return publishing != oldWidget.publishing;
        case CallClientStateAspect.subscriptions:
          return subscriptions != oldWidget.subscriptions;
        case CallClientStateAspect.subscriptionProfiles:
          return subscriptionProfiles != oldWidget.subscriptionProfiles;
        case CallClientStateAspect.availableDevices:
          return availableDevices != oldWidget.availableDevices;
        case CallClientStateAspect.callConfig:
          return callConfig != oldWidget.callConfig;
        case CallClientStateAspect.participantCounts:
          return participantCounts != oldWidget.participantCounts;
        case CallClientStateAspect.username:
          return username != oldWidget.username;
      }
    });