addSecret static method

Future<Secret?> addSecret(
  1. String secret
)

Implementation

static Future<Secret?> addSecret(String secret) async {
  final response = await _dio.post(ApiRoutes.secrets, data: {
    "secret": secret,
  }, queryParameters: {
    "expand": "author"
  });
  final json = response.data;
  return Secret.fromJsonWithExpand(json);
}