removeOtpHistoryEntry method
Implementation
Future<Map<String, dynamic>> removeOtpHistoryEntry({
required String atSign,
required String otp,
required String generatedAtUtc,
}) async {
return mutateState(
atSign: atSign,
mutate: (state) {
final history = _normalizeOtpHistory(state['otpHistory']);
history.removeWhere(
(entry) =>
(entry['otp'] ?? '').toString() == otp &&
(entry['generatedAtUtc'] ?? '').toString() == generatedAtUtc,
);
state['otpHistory'] = history;
},
);
}