Skip to content

Instantly share code, notes, and snippets.

@bacalj
Created December 23, 2019 01:49
Show Gist options
  • Save bacalj/1cb8f52c824d3b0e4cf81fb0670f2a40 to your computer and use it in GitHub Desktop.
Save bacalj/1cb8f52c824d3b0e4cf81fb0670f2a40 to your computer and use it in GitHub Desktop.
dartclass2
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