grid.dart 796 B

12345678910111213141516171819202122232425262728293031
  1. import 'package:fis_lib_report/report/interfaces/block_element.dart';
  2. import 'package:fis_lib_report/report/interfaces/cell.dart';
  3. class RTColumnDefinition {
  4. double? width;
  5. RTColumnDefinition(this.width);
  6. RTColumnDefinition.fromJson(Map<String, dynamic> json) {
  7. width = json["Width"];
  8. }
  9. }
  10. class RTRowDefinition {
  11. double? minHeight = 18;
  12. double? height;
  13. WidthTypeEnum? type;
  14. RTRowDefinition.fromJson(Map<String, dynamic> json) {
  15. minHeight = json['MinHeight'];
  16. height = json['Height'];
  17. if (json['Type'] != null) {
  18. type = WidthTypeEnum.values
  19. .firstWhere((element) => element.name == json['Type']);
  20. }
  21. }
  22. }
  23. abstract class IGrid extends IBlockElement {
  24. List<RTColumnDefinition>? columnDefinitions;
  25. List<RTRowDefinition>? rowDefinitions;
  26. }