Change style to
    Key(this.type, {List<Type> annotations})
        : this.annotations =  new UnmodifiableSetView(
               annotations != null ? annotations.toSet() : new HashSet());
    }