Add explicit types and improve type safety across codebase

This commit adds explicit type annotations to variables, function parameters, and return types throughout the codebase, particularly in widget trees, Bloc logic, and repository implementations. The changes improve code readability, maintainability, and type safety, and align with Dart best practices. No business logic was changed.
This commit is contained in:
Achintha Isuru
2026-01-24 10:00:36 -05:00
parent ff93bfa4bd
commit f57f41c508
99 changed files with 495 additions and 485 deletions

View File

@@ -46,8 +46,8 @@ class LocaleBloc extends Bloc<LocaleEvent, LocaleState> {
LoadLocale event,
Emitter<LocaleState> emit,
) async {
final savedLocale = await getLocaleUseCase();
final locale = const Locale('es');
final Locale? savedLocale = await getLocaleUseCase();
final Locale locale = const Locale('es');
LocaleSettings.setLocaleRaw(locale.languageCode);

View File

@@ -19,7 +19,7 @@ class LocaleRepositoryImpl implements LocaleRepositoryInterface {
@override
Future<Locale?> getSavedLocale() async {
final languageCode = await _localDataSource.getLanguageCode();
final String? languageCode = await _localDataSource.getLanguageCode();
if (languageCode != null) {
return Locale(languageCode);
}