createRepository method
- required String path,
- SetLocalSecret? readSecret,
- SetLocalSecret? writeSecret,
- ShareToken? token,
- bool syncEnabled = false,
- bool dhtEnabled = false,
- bool pexEnabled = false,
inherited
    Creates a new repository.
- path: path to the repository file or name of the repository.
- read_secret: local secret for reading the repository on this device only. Do not share with peers!. If null, the repo won't be protected and anyone with physical access to the device will be able to read it.
- write_secret: local secret for writing to the repository on this device only. Do not share with peers! Can be the same as- read_secretif one wants to use only one secret for both reading and writing. Separate secrets are useful for plausible deniability. If both- read_secretand- write_secretare- None, the repo won't be protected and anyone with physical access to the device will be able to read and write to it. If- read_secretis not- Nonebut- write_secretis- None, the repo won't be writable from this device.
- token: used to share repositories between devices. If not- None, this repo will be linked with the repos with the same token on other devices. See also- Self::repository_share. This also determines the maximal access mode the repo can be opened in. If- None, it's write mode.
Implementation
Future<Repository> createRepository({
  required String path,
  SetLocalSecret? readSecret,
  SetLocalSecret? writeSecret,
  ShareToken? token,
  bool syncEnabled = false,
  bool dhtEnabled = false,
  bool pexEnabled = false,
}) async {
  final request = RequestSessionCreateRepository(
    path: path,
    readSecret: readSecret,
    writeSecret: writeSecret,
    token: token,
    syncEnabled: syncEnabled,
    dhtEnabled: dhtEnabled,
    pexEnabled: pexEnabled,
  );
  final response = await client.invoke(request);
  switch (response) {
    case ResponseRepository(value: final value): return Repository(client, value);
    default: throw UnexpectedResponse();
  }
}