Line data Source code
1 : import 'package:app_pym/core/usecases/usecase.dart';
2 : import 'package:app_pym/domain/entities/map_pym/batiment.dart';
3 : import 'package:app_pym/domain/repositories/map_pym/batiment_repository.dart';
4 : import 'package:flutter/foundation.dart';
5 : import 'package:flutter/material.dart';
6 : import 'package:injectable/injectable.dart';
7 :
8 : @prod
9 : @lazySingleton
10 : class GetBatimentDetail extends Usecase<Future<Batiment>, int> {
11 : final BatimentRepository batimentRepository;
12 :
13 1 : const GetBatimentDetail({
14 : @required this.batimentRepository,
15 : });
16 :
17 1 : @override
18 2 : Future<Batiment> call(int id) => batimentRepository.fetch(id);
19 : }
|