SubMessage.from constructor

SubMessage.from(
  1. String? mainArgument,
  2. List clauses,
  3. dynamic parent
)

Creates the sub-message, given a list of clauses in the sort of form that we're likely to get them from parsing a translation file format, as a list of key, value where value may in turn be a list.

Implementation

SubMessage.from(this.mainArgument, List clauses, parent) : super(parent) {
  for (var clause in clauses) {
    this[clause.first] = (clause.last is List) ? clause.last : [clause.last];
  }
}