setColor method

Future<void> setColor(
  1. Color color,
  2. String? reason
)

Set the role's color.

await role.setColor(Color.fromRGB(255, 0, 0), reason: 'Testing');

Implementation

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