Skip to content

Instantly share code, notes, and snippets.

@faizan1947
Created July 21, 2022 10:54
Show Gist options
  • Save faizan1947/c67359c288991b087e042153e5b6fec8 to your computer and use it in GitHub Desktop.
Save faizan1947/c67359c288991b087e042153e5b6fec8 to your computer and use it in GitHub Desktop.
Enum
void main() {
Car myCar = Car(carStyle: CarType.convertible);
}
class Car{
CarType? carStyle;
Car({this.carStyle});
}
enum CarType{
convertible,
suv,
hatchback
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment