anchor.diff:  final _formatter = new DartFormatter();
   String _fmt(String code) => _formatter.format(code);
   
  -class LambdaTransformer extends Transformer {
  +class LambdaTransformer extends Transformer implements DeclaringTransformer {
     LambdaTransformer.asPlugin();
   
     static const _EXTENSION = '.ui.dart';
  
positive.code:   static final _evaluator = new ConstantEvaluator();
  
    final String _genFileName;
    /// Contains generated `.gen.dart` code.
    final _genCode = new StringBuffer();
    /// Contains rewritten `.ui.dart` code.
    final PrintStringWriter _uiCode;
  
  
negative.code: 
    @override
    bool isPrimary(AssetId id) {
      return id.path.endsWith(_EXTENSION) || id.path.endsWith(_TEST_EXTENSION);
    }
  
    @override
    void declareOutputs(DeclaringTransform transform) {
      final info = new UiFileInfo(transform.primaryId);
      transform.declareOutput(info._outputAssetId);
      transform.declareOutput(info._assetId);
    }
  
    @override
    Future apply(Transform transform) async {
      final info = new UiFileInfo(transform.primaryInput.id);
      try {
        final code = await transform.primaryInput.readAsString();
        final ast = parseCompilationUnit(code, parseFunctionBodies: true);
        final visitor = new _RewriterVisitor(info._genFileName);
        ast.accept(visitor);
        final formattedGenCode = _fmt(visitor.genCode);
        final formattedUiCode = _fmt(visitor.uiCode);
        transform
            .addOutput(new Asset.fromString(info._outputAssetId, formattedGenCode));
        transform.addOutput(new Asset.fromString(info._assetId, formattedUiCode));
      } catch (e, s) {
        stderr.writeln(
          'Failed to transform and therefore skipping ${info._assetId}:\n'
          'ERROR: $e\n'
          'STACK TRACE: $s');
      }
    }
  }
  
  class UiFileInfo {
    final AssetId _assetId;
    String _inputDirectory;
    String _baseFileName;
    String _genFileName;
    String _genPath;
    AssetId _outputAssetId;
  
    UiFileInfo(this._assetId) {
      _inputDirectory = path.dirname(_assetId.path);
      // call basenameWithoutExtension because we use double-extension
      _baseFileName = path
          .basenameWithoutExtension(path.basenameWithoutExtension(_assetId.path));
      _genFileName = '${_baseFileName}.gen.dart';
      _genPath = path.join(_inputDirectory, _genFileName);
      _outputAssetId = new AssetId(_assetId.package, _genPath);
    }
  }
  
  