fix: add ignore_for_file to data connect Repos and modify CI to avoid analyzing deleted files
This commit is contained in:
@@ -8,11 +8,11 @@ sealed class LocaleEvent {
|
||||
|
||||
/// Event triggered when the user wants to change the application locale.
|
||||
class ChangeLocale extends LocaleEvent {
|
||||
/// The new locale to apply.
|
||||
final Locale locale;
|
||||
|
||||
/// Creates a [ChangeLocale] event.
|
||||
const ChangeLocale(this.locale);
|
||||
/// The new locale to apply.
|
||||
final Locale locale;
|
||||
}
|
||||
|
||||
/// Event triggered to load the saved locale from persistent storage.
|
||||
|
||||
@@ -11,11 +11,11 @@ abstract interface class LocaleLocalDataSource {
|
||||
|
||||
/// Implementation of [LocaleLocalDataSource] using [SharedPreferencesAsync].
|
||||
class LocaleLocalDataSourceImpl implements LocaleLocalDataSource {
|
||||
static const String _localeKey = 'app_locale';
|
||||
final SharedPreferencesAsync _sharedPreferences;
|
||||
|
||||
/// Creates a [LocaleLocalDataSourceImpl] with the required [SharedPreferencesAsync] instance.
|
||||
LocaleLocalDataSourceImpl(this._sharedPreferences);
|
||||
static const String _localeKey = 'app_locale';
|
||||
final SharedPreferencesAsync _sharedPreferences;
|
||||
|
||||
@override
|
||||
Future<void> saveLanguageCode(String languageCode) async {
|
||||
|
||||
@@ -3,10 +3,10 @@ import '../repositories/locale_repository_interface.dart';
|
||||
|
||||
/// Use case to retrieve the default locale.
|
||||
class GetDefaultLocaleUseCase {
|
||||
final LocaleRepositoryInterface _repository;
|
||||
|
||||
/// Creates a [GetDefaultLocaleUseCase] with the required [LocaleRepositoryInterface].
|
||||
GetDefaultLocaleUseCase(this._repository);
|
||||
final LocaleRepositoryInterface _repository;
|
||||
|
||||
/// Retrieves the default locale.
|
||||
Locale call() {
|
||||
|
||||
@@ -7,10 +7,10 @@ import '../repositories/locale_repository_interface.dart';
|
||||
/// This class extends [NoInputUseCase] and interacts with [LocaleRepositoryInterface]
|
||||
/// to fetch the saved locale.
|
||||
class GetLocaleUseCase extends NoInputUseCase<Locale?> {
|
||||
final LocaleRepositoryInterface _repository;
|
||||
|
||||
/// Creates a [GetLocaleUseCase] with the required [LocaleRepositoryInterface].
|
||||
GetLocaleUseCase(this._repository);
|
||||
final LocaleRepositoryInterface _repository;
|
||||
|
||||
@override
|
||||
Future<Locale> call() {
|
||||
|
||||
@@ -3,10 +3,10 @@ import '../repositories/locale_repository_interface.dart';
|
||||
|
||||
/// Use case to retrieve the list of supported locales.
|
||||
class GetSupportedLocalesUseCase {
|
||||
final LocaleRepositoryInterface _repository;
|
||||
|
||||
/// Creates a [GetSupportedLocalesUseCase] with the required [LocaleRepositoryInterface].
|
||||
GetSupportedLocalesUseCase(this._repository);
|
||||
final LocaleRepositoryInterface _repository;
|
||||
|
||||
/// Retrieves the supported locales.
|
||||
List<Locale> call() {
|
||||
|
||||
@@ -7,10 +7,10 @@ import '../repositories/locale_repository_interface.dart';
|
||||
/// This class extends [UseCase] and interacts with [LocaleRepositoryInterface]
|
||||
/// to save a given locale.
|
||||
class SetLocaleUseCase extends UseCase<Locale, void> {
|
||||
final LocaleRepositoryInterface _repository;
|
||||
|
||||
/// Creates a [SetLocaleUseCase] with the required [LocaleRepositoryInterface].
|
||||
SetLocaleUseCase(this._repository);
|
||||
final LocaleRepositoryInterface _repository;
|
||||
|
||||
@override
|
||||
Future<void> call(Locale input) {
|
||||
|
||||
Reference in New Issue
Block a user