class AuthenticationService { Future verifyTwoFactorCode(String code) async { await Future.delayed(const Duration(seconds: 2)); if (code == '000000') { return true; } else { throw const WrongCodeException(); } } } class WrongCodeException implements Exception { const WrongCodeException(); @override String toString() => 'WrongCodeException'; }