setName method

Future<void> setName(
  1. String name,
  2. String? reason
)

Set the role's name.

 await role.setName('New Role Name', reason: 'Testing');

Implementation

Future<void> setName(String name, String? reason) async {
  await dataStoreRole.updateRole(
    id: id,
    serverId: server.id,
    reason: reason,
    payload: {'name': name},
  );
}