Dart enumerations,classes and objects
Enumerations Named list of related items enum PersonProperties { firstName , lastName , age } void test () { print ( PersonProperties . firstName ); } Switch is the prefreed way of doing enumerations Classes class Person { void run () { print ( 'Running' ); } void breathe () { print ( 'Brething' ); } } void test () { //we have to first create instance of class to use it or we will get error final person = Person (); person . run (); } Objects final foo = Person(); Constructor class Person { final String name ; Person ( this . name ); } void test () { final foo = Person ( 'him' ); print ( foo . name ); } Methods class Person { final String name ; Person ( this . name ); void printName () { print ( 'I will now priny name of person' ); print ( name ); } } void test () ...