getSnapshotFile method Null safety

  1. @visibleForTesting
Future<File> getSnapshotFile(
  1. String filename,
  2. SnapshotTestOptions opts
)

Implementation

@visibleForTesting
static Future<File> getSnapshotFile(
    String filename, SnapshotTestOptions opts) async {
  var path = opts.snapshotDirPath;
  if (path[path.length - 1] == '/') {
    path = path.substring(0, path.length - 1);
  }
  return File('$path/$filename');
}