create method

  1. @override
FutureOr<Response> create(
  1. ReferralModel entity
)
inherited

The create method creates a new entity.

Implementation

@override
FutureOr<Response> create(D entity) async {
  return executeFuture(
    future: () async {
      return await dio.post(
        createPath,
        data: {
          EntityPlurals.getPluralForEntityName(entityName): [entity.toMap()],
          "apiOperation": "CREATE",
        },
      );
    },
  );
}