Created with <3 with dartpad.dev.
Created
July 21, 2022 10:54
-
-
Save faizan1947/c67359c288991b087e042153e5b6fec8 to your computer and use it in GitHub Desktop.
Enum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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