updateGroup static method

Future<Group> updateGroup(
  1. String groupId,
  2. GroupContent groupContent
)

Implementation

static Future<Group> updateGroup(String groupId, GroupContent groupContent) {
  // make sure group id is set in content
  groupContent.id = groupId;
  Map<String, dynamic> updateGroupBody = {
    'content': groupContent.toJSON(),
    'groupId': groupId,
  };
  return NativeBridge.async(
          'Communities.updateGroup', jsonEncode(updateGroupBody))
      .then((result) => Group.fromJSON(jsonDecode(result)));
}