Created
June 7, 2018 09:37
-
-
Save mashiro/f295337a3993f4e18c5349a6bd3924cf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import "./point.dart"; | |
import "./print.dart"; | |
void main() { | |
var p = new Point(1, 2); | |
printPoint(p); | |
} |
This file contains hidden or 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 Point { | |
num x; | |
num y; | |
Point(this.x, this.y); | |
} |
This file contains hidden or 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
import "./point.dart"; | |
void printPoint(Point p) { | |
print("Point: (${p.x}, ${p.y})"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment