createSuccessResponse<E> method

FeedbackResponse<E> createSuccessResponse<E>({
  1. required dynamic isPlural,
  2. required E result,
})

Creates a successful 'create' FeedbackResponse with a result.

Define isPlural to show the proper type of message.

Implementation

FeedbackResponse<E> createSuccessResponse<E>({
  required isPlural,
  required E result,
}) =>
    FeedbackResponse.success(
      title: _feedbackConfig.createSuccessTitle,
      message: isPlural
          ? _feedbackConfig.createSuccessPluralMessage
          : _feedbackConfig.createSuccessSingularMessage,
      result: result,
    );