stripe_native_card_field/lib/card_text_field_error.dart
Nathan Anderson 462e40308f 0.0.6 release
2023-12-01 16:12:42 -07:00

20 lines
472 B
Dart

/// Error class that `CardTextField` throws if any errors are encountered
class CardTextFieldError extends Error {
/// Details provided for the error
String? details;
CardTextFieldErrorType type;
CardTextFieldError(this.type, {this.details});
@override
String toString() {
return 'CardTextFieldError-${type.name}: $details';
}
}
/// Enum to add typing to the `CardTextFieldErrorType`
enum CardTextFieldErrorType {
stripeImplementation,
unknown,
}