create static method

Future<RunStateStore> create({
  1. required File file,
  2. required String configHash,
  3. required String operation,
})

Implementation

static Future<RunStateStore> create({
  required File file,
  required String configHash,
  required String operation,
}) async {
  final now = DateTime.now().toUtc();
  final store = RunStateStore._(
    file,
    RunState(
      configHash: configHash,
      operation: operation,
      startedAt: now,
    ),
  );
  await store.flush();
  return store;
}