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