createAndInstallCanister static method
dynamic
createAndInstallCanister(
- Service interfaceFactory,
- FieldOptions fields,
- CallConfig? config
Implementation
static createAndInstallCanister(
Service interfaceFactory,
FieldOptions fields,
CallConfig? config,
) async {
final canisterId = await createCanister(config);
final newConfig = ActorConfig()
..agent = config?.agent
..canisterId = canisterId
..effectiveCanisterId = config?.effectiveCanisterId
..pollingStrategyFactory = config?.pollingStrategyFactory;
install(fields, newConfig);
return createActor(interfaceFactory, newConfig);
}