create static method

Future<ProtoConnection> create({
  1. required ProtoConnectionPost post,
  2. required ProtoNetworkSettings settings,
  3. required String name,
  4. required String group,
})

Implementation

static Future<ProtoConnection> create({
  required ProtoConnectionPost post,
  required ProtoNetworkSettings settings,
  required String name,
  required String group,
}) async {
  final instance = ProtoConnection._(post, settings, name, group);

  final lib = createLib();
  instance.connection = await lib.newStaticMethodProtoConnectionDartWrapper(
    instanceHash: instance.instanceHash,
  );

  return instance;
}