createAgent static method
Implementation
static Future<AgentFactory> createAgent(
{required String canisterId,
required String url,
required Service idl,
Identity? identity,
bool? debug = true}) async {
var agentFactory = AgentFactory(
canisterId: canisterId,
url: url,
idl: idl,
identity: identity ?? AnonymousIdentity(),
debug: debug);
await agentFactory.initAgent(url);
agentFactory.setActor();
return agentFactory;
}