Created
December 23, 2019 01:49
-
-
Save bacalj/1cb8f52c824d3b0e4cf81fb0670f2a40 to your computer and use it in GitHub Desktop.
dartclass2
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
class Car{ | |
int wheels = 4; | |
String modelName; | |
Car( {String givenModelName} ){ | |
modelName = givenModelName; | |
} | |
} | |
void main() { | |
Car myCar = Car(givenModelName: "Corolla"); | |
print(myCar.modelName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment