Advertisement
namo352

get_current_weather_use_case.dart

Jul 31st, 2024
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.63 KB | None | 0 0
  1. import 'package:ementodo/core/resources/data_state.dart';
  2. import 'package:ementodo/core/use_case/use_case.dart';
  3. import 'package:ementodo/features/feature_weather/domain/entities/current_city_entity.dart';
  4. import 'package:ementodo/features/feature_weather/domain/repositories/weather_repository.dart';
  5.  
  6. class GetCurrentWeatherUseCase
  7.     extends UseCase<DataState<CurrentCityEntity>, String> {
  8.   final WeatherRepository weatherRepository;
  9.  
  10.   GetCurrentWeatherUseCase(this.weatherRepository);
  11.  
  12.   @override
  13.   Future<DataState<CurrentCityEntity>> call(String params) {
  14.     return weatherRepository.fetchCurrentWeatherData(params);
  15.   }
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement