Skip to content

Instantly share code, notes, and snippets.

@simrandotdev
Created March 17, 2019 17:36
Show Gist options
  • Save simrandotdev/2654087d7e1c6ecee5e6f1c38afad3f1 to your computer and use it in GitHub Desktop.
Save simrandotdev/2654087d7e1c6ecee5e6f1c38afad3f1 to your computer and use it in GitHub Desktop.
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