W3cubDocs

/Dart 2

DomRectReadOnly constructor

DomRectReadOnly([num x, num y, num width, num height ])

Implementation

factory DomRectReadOnly([num x, num y, num width, num height]) {
  if (height != null) {
    return DomRectReadOnly._create_1(x, y, width, height);
  }
  if (width != null) {
    return DomRectReadOnly._create_2(x, y, width);
  }
  if (y != null) {
    return DomRectReadOnly._create_3(x, y);
  }
  if (x != null) {
    return DomRectReadOnly._create_4(x);
  }
  return DomRectReadOnly._create_5();
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-html/DomRectReadOnly/DomRectReadOnly.html