# Rectangle (/zh-CN/api-reference/rtc/flutter/class-rectangle)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

<a id="class_rectangle__prototype"></a>

```dart
class Rectangle {
  const Rectangle({this.x, this.y, this.width, this.height});

  @JsonKey(name: 'x')
  final int? x;
  @JsonKey(name: 'y')
  final int? y;
  @JsonKey(name: 'width')
  final int? width;
  @JsonKey(name: 'height')
  final int? height;
  factory Rectangle.fromJson(Map<String, dynamic> json) =>
      _$RectangleFromJson(json);
  Map<String, dynamic> toJson() => _$RectangleToJson(this);
}
```

<a id="class_rectangle__parameters"></a>

## 属性 [#属性]

<ParameterList>
<a id="x"></a>
<Parameter name="x">

左上角的横向偏移。

</Parameter>
<a id="y"></a>
<Parameter name="y">

左上角的纵向偏移。

</Parameter>
<a id="width"></a>
<Parameter name="width">

目标区域的宽度。

</Parameter>
<a id="height"></a>
<Parameter name="height">

目标区域的高度。

</Parameter>
</ParameterList>
