my_household_state.dart 756 B

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