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

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

  final int? id;
  final String? type;  // forsale  forrent

  GarageSaleRentDetailEntity? datas;

  GarageDetailState({
    this.loadingState = LoadState.State_Loading,
    this.errorMessage,
    this.id,
    this.type,
    required this.datas,
  });

  GarageDetailState copyWith({
    GarageSaleRentDetailEntity? datas,
    LoadState? loadingState,
    String? errorMessage,
    int? id,
    String? type,
  }) {
    return GarageDetailState(
      loadingState: loadingState ?? this.loadingState,
      errorMessage: errorMessage ?? this.errorMessage,
      id: id ?? this.id,
      type: type ?? this.type,
      datas: datas?? this.datas,
    );
  }
}