import 'package:json_annotation/json_annotation.dart';

part 'widget_location.g.dart';

/// 组件位置西悉尼
@JsonSerializable()
class WidgetLocation {
  @JsonKey(name: 'left')
  final double? left;

  @JsonKey(name: 'top')
  final double? top;

  @JsonKey(name: 'right')
  final double? right;

  @JsonKey(name: 'bottom')
  final double? bottom;

  WidgetLocation(this.left, this.top, this.right, this.bottom);

  Map<String, dynamic> toJson() => _$WidgetLocationToJson(this);

  factory WidgetLocation.fromJson(Map<String, dynamic> json) =>
      _$WidgetLocationFromJson(json);
}
