createActor method

Future createActor(
  1. String userId,
  2. String name,
  3. String? summary
)

Implementation

Future createActor(String userId, String name, String? summary) async {
  var domainName = Config.domainName;

  Map<String, dynamic> bodyMap = {
    "type": "Person",
    "name": name,
    "preferredUsername": name,
    "summary": summary,
  };

  String body = jsonEncode(bodyMap);
  await AuthBaseApi.post(
      url: Uri.parse("https://auth.$domainName/user/actors?userid=$userId"),
      body: body);
}