generateColorsFromAgent static method

Future<void> generateColorsFromAgent(
  1. String agentId
)

Implementation

static Future<void> generateColorsFromAgent(String agentId) async {
  final agentService = AgentService();
  final agent = await agentService.getAgentById(agentId);

  if (agent!= null && agent.agentConfigs?.colors != null) {
    _primary = HexColor(agent.agentConfigs?.colors!['primary']);
    _secondary = HexColor(agent.agentConfigs?.colors!['secondary']);
    _accent = HexColor(agent.agentConfigs?.colors!['tertiary']);
  }
}