Attribute constructor
const
Attribute({})
Implementation
const Attribute({
required this.name,
String? type,
String? init,
String? html,
bool isBool = false,
}) : assert(name != ''),
type = type ?? (isBool ? 'final bool $name;' : 'final String? $name;'),
init = init ?? (isBool ? 'this.$name = false' : 'this.$name'),
html =
html ??
(isBool
? 'if ($name) \' $name\''
: 'if ($name != null) \' $name="\$$name"\''),
isBool = isBool;