getPublicDirectory function Null safety

Future<Directory> getPublicDirectory(
  1. Config config
)

Public directory contains generated static files suitable for publishing.

Config: build.public_dir

Implementation

Future<Directory> getPublicDirectory(Config config) async {
  return _getOrThrow(
    fs.directory(config.build.publicDir),
  );
}