resolve static method
Implementation
static RevokeResolution resolve({
required List<Map<String, dynamic>> matches,
required String? currentKeyId,
required bool force,
}) {
if (matches.isEmpty) {
return const RevokeResolution._(RevokeDecision.noMatch);
}
if (matches.length > 1) {
return RevokeResolution._(RevokeDecision.ambiguous, matches: matches);
}
final match = matches.single;
if (match['id'] == currentKeyId && !force) {
return RevokeResolution._(RevokeDecision.inUse, match: match);
}
return RevokeResolution._(RevokeDecision.proceed, match: match);
}