addAPICall method
Implementation
Future<void> addAPICall({
required String apiType,
required String endPoint,
required String apiName,
required String featureName,
required String responseModelName,
required String shimmerChoice,
required String requestModelName,
required String apiMethodName,
}) async {
/// update api_constants.dart file to add end point
await AddAPICallUtil().apiConstantFileUpdate(
apiType: apiType,
apiName: apiName,
endPoint: endPoint,
);
/// update api_constants.dart file to add end point
await AddAPICallUtil().mockApiConstantFileUpdate(
apiName: apiName,
);
/// update data_source.dart and data_source_impl to add imports statement and function signature
await AddAPICallUtil().createDataSourceAndDataSourceImpl(
featureName: featureName,
requestModelName: requestModelName,
apiName: apiName,
apiMethodName: apiMethodName,
);
/// update repo.dart and repo_impl.dart to add imports statement and function signature
await AddAPICallUtil().createRepoAndRepoImpl(
featureName: featureName,
requestModelName: requestModelName,
responseModelName: responseModelName,
apiName: apiName,
apiMethodName: apiMethodName,
);
/// update a usecase
await AddAPICallUtil().createUsaCase(
featureName: featureName,
useCaseName: apiName,
requestModelName: requestModelName,
apiMethod: apiMethodName,
);
/// update bloc ,event and state to add imports statement and function signature
await AddAPICallUtil().updateBlocEventAndStates(
featureName: featureName,
requestModelName: requestModelName,
responseModelName: responseModelName,
apiName: apiName,
apiMethodName: apiMethodName,
shimmerChoice: shimmerChoice,
);
}