Skip to content

Instantly share code, notes, and snippets.

@serpicokhan
Created May 16, 2022 14:08
Show Gist options
  • Select an option

  • Save serpicokhan/847e85dca4bc947c668ea67b77900290 to your computer and use it in GitHub Desktop.

Select an option

Save serpicokhan/847e85dca4bc947c668ea67b77900290 to your computer and use it in GitHub Desktop.
class Points {
final double x;
final double y;
//unnamed constructor
Points(this.x, this.y);
// Named constructor
Points.origin(double x,double y)
: x = x,
y = y;
// Named constructor
Points.destination(double x,double y)
: x = x,
y = y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment