create method

Future<XRPCResponse<RepoCreateRecordOutput>> create({
  1. required ListPurpose purpose,
  2. required String name,
  3. String? description,
  4. List<RichtextFacet>? descriptionFacets,
  5. Blob? avatar,
  6. UGraphListLabels? labels,
  7. DateTime? createdAt,
  8. String? rkey,
  9. bool? validate,
  10. String? swapCommit,
  11. Map<String, String>? $headers,
  12. Map<String, String>? $unknown,
})

Implementation

Future<XRPCResponse<RepoCreateRecordOutput>> create({
  required ListPurpose purpose,
  required String name,
  String? description,
  List<RichtextFacet>? descriptionFacets,
  Blob? avatar,
  UGraphListLabels? labels,
  DateTime? createdAt,
  String? rkey,
  bool? validate,
  String? swapCommit,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await comAtprotoRepoCreateRecord(
  repo: _ctx.repo,
  collection: ids.appBskyGraphList,
  rkey: rkey,
  validate: validate,
  record: {
    ...?$unknown,
    'purpose': purpose.toJson(),
    'name': name,
    if (description != null) 'description': description,
    if (descriptionFacets != null)
      'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(),
    if (avatar != null) 'avatar': avatar,
    if (labels != null) 'labels': labels.toJson(),
    'createdAt': iso8601(createdAt),
  },
  swapCommit: swapCommit,
  $ctx: _ctx,
  $headers: $headers,
);