import 'package:domain/entity/form_list_entity.dart';
import 'package:widgets/load_state_layout.dart';

class FormApplyState {

  //页面 LoadView 状态的展示
  LoadState loadingState;
  String? errorMessage;

  List<FormListEntity> datas; //页面列表数据

  // ===================================  Begin  ↓  ===================================

  FormApplyState({
    this.loadingState = LoadState.State_Loading,
    this.errorMessage,
    required this.datas,
  });

  FormApplyState copyWith({
    LoadState? loadingState,
    String? errorMessage,
    bool? needShowPlaceholder,
    List<FormListEntity>? datas,
  }) {
    return FormApplyState(
      errorMessage: errorMessage ?? this.errorMessage,
      loadingState: loadingState ?? this.loadingState,
      datas: datas ?? this.datas,
    );
  }
}
