Creating a class
suggest changeClasses can be created as follows:
class InputField {
int? maxLength;
String? name;
}
The class can be instantiated using the new keyword. Nullable fields are null until you set them.
var field = new InputField();
Field values can then be accessed:
// this will trigger the setter
field.name = "fieldname";
// this will trigger the getter
print(field.name);
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents