我正在尝试制作一个也在包装上运行的飞镖变压器,但我无法弄清楚我目前是如何拥有以下
class MyTransformer extends Transformer implements LazyTransformer {
MyTransformer.asPlugin();
String get allowedExtensions => ".dart";
void declareOutputs(DeclaringTransform transform) {
// Just transforms a Dart file in place.
transform.declareOutput(transform.primaryId);
}
Future apply(Transform transform) {
//Only prints files that are in project how to include packages?
print(transform.primaryInput.id.path);
return //do work here
}
}
先谢谢,我知道如何让它发挥作用