class Robot {
  static final Robot _instance = new Robot._(7);
  final double height;

  factory Robot() {
    return _instance;
  }

  Robot._(this.height);
}

void main() {
  var r1 = Robot();
  var r2 = Robot();
  print(identical(r1, r2)); // true
  print(r1 == r2); // true
}