Created
March 17, 2019 17:36
-
-
Save simrandotdev/2654087d7e1c6ecee5e6f1c38afad3f1 to your computer and use it in GitHub Desktop.
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
void main() { | |
final square = Square(side: 10.0); | |
print(square.area()); | |
} | |
abstract class Shape { | |
double area(); | |
} | |
class Square implements Shape { | |
Square({this.side}); | |
final double side; | |
double area() => side * side; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment