apply_state.dart 649 B

12345678910111213141516171819202122232425262728293031323334
  1. class ApplyState {
  2. //详情页面的索引,不参与Copy
  3. int detailPageIndex;
  4. //表单类型
  5. String? formType;
  6. //是否可编辑
  7. bool enableEdit;
  8. //表单对应的详情数据
  9. Map<String, dynamic>? applyDetail;
  10. ApplyState({
  11. this.formType,
  12. this.applyDetail,
  13. this.enableEdit = true,
  14. this.detailPageIndex = 0,
  15. });
  16. ApplyState copyWith({
  17. String? formType,
  18. bool? enableEdit,
  19. Map<String, dynamic>? applyDetail,
  20. }) {
  21. return ApplyState(
  22. formType: formType ?? this.formType,
  23. enableEdit: enableEdit ?? this.enableEdit,
  24. applyDetail: applyDetail ?? this.applyDetail,
  25. );
  26. }
  27. }