Creating a class

suggest change

Classes can be created as follow:

class InputField {
  int maxLength;
  String name;

The class can be instantiated using the new keyword after which the field values will be null by default.

var field = new InputField();

Field values can then be accessed:

// this will trigger the setter = "fieldname";

// this will trigger the getter

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents