diff --git a/CHANGELOG.md b/CHANGELOG.md index 516b447..5056be6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 0.0.3 + +# Feat + +- SimpleLocalizedError + # 0.0.2 # Feat diff --git a/lib/src/model/data/error/localized_error.dart b/lib/src/model/data/error/localized_error.dart index f5f0321..cb359b5 100644 --- a/lib/src/model/data/error/localized_error.dart +++ b/lib/src/model/data/error/localized_error.dart @@ -9,3 +9,14 @@ abstract class BaseLocalizedError extends Error @override String? getTranslatedError(Localization localization) => null; } + +class SimpleLocalizedError extends Error implements BaseLocalizedError { + final String message; + + SimpleLocalizedError(this.message); + @override + String get errorLocalizationKey => message; + + @override + String? getTranslatedError(void localization) => message; +}