generate method Null safety

  1. @override
String generate(
  1. String key,
  2. List<Node> ats
)
override

Implementation

@override
String generate(String key, List<Node> ats) {
  _arguments.clear();
  final msg = _convertATS(ats);
  if (_arguments.isEmpty) {
    return """String get $key => $msg""";
  } else {
    final arguments =
        _arguments.distinct().map((it) => "dynamic $it").join(", ");
    return """String $key({$arguments}) => $msg""";
  }
}