check method

Future<void> check(
  1. BuildStep buildStep,
  2. String? filename
)

This is needed to let build system know that we depend on given file

Implementation

Future<void> check(BuildStep buildStep, String? filename) async {
  if (filename == null) {
    return;
  }
  await buildStep.canRead(AssetId(buildStep.inputId.package, filename));
}