Skip to content

Instantly share code, notes, and snippets.

@graphicbeacon
Created April 21, 2018 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graphicbeacon/96905070d810ace5a97da698883841b8 to your computer and use it in GitHub Desktop.
Save graphicbeacon/96905070d810ace5a97da698883841b8 to your computer and use it in GitHub Desktop.
Sample code for 'Learn Dart Before You Flutter' blog post on Medium (2)
class Order {
var _id;
var _reference;
var _date;
Order(this._id, this._reference, this._date);
getInfo() {
return 'Your order information:'
'\n-------------------------------'
'\n Id: $_id'
'\n Reference: $_reference'
'\n Date: $_date'
'\n-------------------------------';
}
}
void main() {
var order1 = new Order(1, 'ref1', new DateTime.now());
print(order1.getInfo());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment