shouldProcess<T> method
Returns true when the interceptor is enabled and the optional
filter either is null or returns true for value.
Consolidates the settings.enabled && (filter?.call(x) ?? true) pattern
used across all network interceptors.
Implementation
bool shouldProcess<T>({
required bool enabled,
required bool Function(T)? filter,
required T value,
}) =>
enabled && (filter?.call(value) ?? true);