grid.dart 929 B

123456789101112131415161718192021222324252627282930313233
  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. var targetMinHeight = json['MinHeight'];
  16. minHeight = targetMinHeight < 26 ? 26 : targetMinHeight;
  17. var targetHeight = json['Height'];
  18. height = targetHeight < 28 ? 28 : targetHeight;
  19. if (json['Type'] != null) {
  20. type = WidthTypeEnum.values
  21. .firstWhere((element) => element.name == json['Type']);
  22. }
  23. }
  24. }
  25. abstract class IGrid extends IBlockElement {
  26. List<RTColumnDefinition>? columnDefinitions;
  27. List<RTRowDefinition>? rowDefinitions;
  28. }