forked from eatvio/eatvio_app
23 lines
792 B
Dart
23 lines
792 B
Dart
import 'package:dio/dio.dart';
|
|
import 'package:eatvio_app/features/create_plan/repositories/create_plan_repository.dart';
|
|
import 'package:eatvio_app/features/create_plan/services/create_plan_service.dart';
|
|
|
|
class FixtureCreatePlanRepository extends CreatePlanRepository {
|
|
FixtureCreatePlanRepository() : super(createPlanService: _NoopCreatePlanService());
|
|
|
|
final List<Map<String, dynamic>> createPlanRequests = <Map<String, dynamic>>[];
|
|
|
|
@override
|
|
Future<void> createPlan({required Map<String, dynamic> model}) async {
|
|
createPlanRequests.add(Map<String, dynamic>.from(model));
|
|
}
|
|
}
|
|
|
|
class _NoopCreatePlanService implements CreatePlanService {
|
|
@override
|
|
Future<void> createPlan({required FormData formData}) {
|
|
throw UnimplementedError('Not used in fixture tests');
|
|
}
|
|
}
|
|
|