feat:browse bloc done

This commit is contained in:
jahongireshonqulov
2025-10-25 17:54:56 +05:00
parent 57af573b6f
commit 97aae6e108
15 changed files with 377 additions and 37 deletions

View File

@@ -1,6 +1,7 @@
abstract class AppLocaleKeys {
///Storage keys
static const String language = 'language';
static const String browseSearchHistory = 'browse-search-history';
static const String fontBold = "fontBold";
static const String fontMedium = "fontMedium";

View File

@@ -13,6 +13,8 @@ import 'package:get_it/get_it.dart' as _i174;
import 'package:injectable/injectable.dart' as _i526;
import '../../feature/basket/presentation/blocs/basket_bloc.dart' as _i728;
import '../../feature/browse/presentation/blocs/browse_bloc/browse_bloc.dart'
as _i991;
import '../../feature/common/presentation/blocs/language_bloc/language_bloc.dart'
as _i942;
import '../../feature/home/presentation/blocs/home_bloc/home_bloc.dart'
@@ -33,9 +35,10 @@ extension GetItInjectableX on _i174.GetIt {
}) {
final gh = _i526.GetItHelper(this, environment, environmentFilter);
gh.factory<_i1007.HomeBloc>(() => _i1007.HomeBloc());
gh.factory<_i728.BasketBloc>(() => _i728.BasketBloc());
gh.factory<_i991.BrowseBloc>(() => _i991.BrowseBloc());
gh.factory<_i580.MainBloc>(() => _i580.MainBloc());
gh.factory<_i311.SplashBloc>(() => _i311.SplashBloc());
gh.factory<_i728.BasketBloc>(() => _i728.BasketBloc());
gh.singleton<_i306.StorageService>(() => _i306.StorageService());
gh.singleton<_i152.AppRoutes>(() => _i152.AppRoutes());
gh.factory<_i942.LanguageBloc>(

View File

@@ -12,6 +12,16 @@ class StorageService {
_sharedPreference.setString(key, value);
}
void setStringList({required String key, required String value}) {
final oldList = _sharedPreference.getStringList(key);
final newList = oldList?..add(value);
_sharedPreference.setStringList(key, newList ?? []);
}
List<String> getStringList({required String key}) {
return _sharedPreference.getStringList(key) ?? [];
}
String? getString({required String key}) {
return _sharedPreference.getString(key);
}