widget_location.dart 588 B

1234567891011121314151617181920212223242526
  1. import 'package:json_annotation/json_annotation.dart';
  2. part 'widget_location.g.dart';
  3. /// 组件位置西悉尼
  4. @JsonSerializable()
  5. class WidgetLocation {
  6. @JsonKey(name: 'left')
  7. final double? left;
  8. @JsonKey(name: 'top')
  9. final double? top;
  10. @JsonKey(name: 'right')
  11. final double? right;
  12. @JsonKey(name: 'bottom')
  13. final double? bottom;
  14. WidgetLocation(this.left, this.top, this.right, this.bottom);
  15. Map<String, dynamic> toJson() => _$WidgetLocationToJson(this);
  16. factory WidgetLocation.fromJson(Map<String, dynamic> json) =>
  17. _$WidgetLocationFromJson(json);
  18. }