Dot([String name = "Undefined", int n = -1]) { _name = name; num = n; _ln = {}; } Dot.fromTwoLists(String name, List num0, List length, [int n = -1]) { _name = name; num = n; Map nw = {}; if (num0.length != length.length) { print("Error in lists"); } else { for (var i = 0; i < num0.length; i++) { nw[num0[i]] = length[i]; _ln = nw; } } } Dot.fromMap(String name, Map l, [int n = -1]) { _name = name; num = n; _ln = l; }