You can simply add a new constructor for this that sets the data-name
attribute too:
class SaveBtn {
// ...
factory SaveBtn(String label) {
var btn = new Element.tag(tag);
btn.setAttribute('data-name', label); // Set properties/call methods here
return btn;
}
// ...
}