manage_state.dart 733 B

1234567891011121314151617181920212223242526272829303132
  1. import 'package:widgets/load_state_layout.dart';
  2. class ManageState {
  3. //页面 LoadView 状态的展示
  4. LoadState loadingState;
  5. String? errorMessage;
  6. List<bool> datas; //页面列表数据
  7. // =================================== Begin ↓ ===================================
  8. ManageState({
  9. this.loadingState = LoadState.State_Loading,
  10. this.errorMessage,
  11. required this.datas,
  12. });
  13. ManageState copyWith({
  14. LoadState? loadingState,
  15. String? errorMessage,
  16. bool? needShowPlaceholder,
  17. List<bool>? datas,
  18. }) {
  19. return ManageState(
  20. errorMessage: errorMessage ?? this.errorMessage,
  21. loadingState: loadingState ?? this.loadingState,
  22. datas: datas ?? this.datas,
  23. );
  24. }
  25. }