Created
April 21, 2018 18:41
-
-
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)
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 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