import 'package:dio/dio.dart'; import 'package:retrofit/retrofit.dart'; part 'create_plan_service.g.dart'; @RestApi() abstract class CreatePlanService { factory CreatePlanService(Dio dio, {String baseUrl}) = _CreatePlanService; @POST('/api/plans/create') @MultiPart() Future createPlan({ @Body() required Map model, }); @POST('/api/plans/create/{slug}/packet_option') Future createPacketOption({ @Path() required String slug, @Body() required Map model, }); @POST('/api/plans/create/{slug}/packet_options') Future createPacketOptions({ @Path() required String slug, @Body() required Map model, }); }