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

class PaymentListState {

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

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

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

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

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