createAndInstallCanister static method
Future<CanisterActor>
createAndInstallCanister(
- Service interfaceFactory,
- FieldOptions fields,
- CallConfig? config
Implementation
static Future<CanisterActor> 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);
}