observe method Null safety

  1. @override
void observe(
  1. {required Model? modelPrevious,
  2. required Model? modelCurrent,
  3. bool? isDistinct,
  4. StoreConnectorInterface? storeConnector,
  5. int? reduceCount,
  6. int? dispatchCount}
)
override

Implementation

@override
void observe({
  required Model? modelPrevious,
  required Model? modelCurrent,
  bool? isDistinct,
  StoreConnectorInterface? storeConnector,
  int? reduceCount,
  int? dispatchCount,
}) {
  _previous = modelPrevious;
  _current = modelCurrent;

  var shouldObserve = _storeConnectorTypes.isEmpty ||
      _storeConnectorTypes.contains(storeConnector!.debug?.runtimeType);

  if (shouldObserve)
    print("Model D:$dispatchCount R:$reduceCount = "
        "Rebuild:${isDistinct == null || isDistinct}, "
        "${storeConnector!.debug == null ? "" : //
    "Connector:${storeConnector.debug.runtimeType}"}, "
        "Model:$modelCurrent.");
}