firstWhereLogTypeOrNull method
The method allows you to get the first element that satisfies the condition or null if no element satisfies the condition.
Implementation
TalkerLogType? firstWhereLogTypeOrNull(
bool Function(TalkerLogType element) test) =>
cast<TalkerLogType?>()
.firstWhere((v) => v != null && test(v), orElse: () => null);