Check out example codes for "flutter types class enum". It will help you in understanding the concepts better.

Code Example 1

enum CarType {
  sedan,
  suv,
  truck
}

class CarHireCompany {
  CarType storageType;

  CarHireCompany({@required this.storageType});
}

Learn ReactJs, React Native from akashmittal.com