part of 'search_result_goods_list_bloc.dart';

abstract class SearchResultGoodsListState extends Equatable {
  const SearchResultGoodsListState();

  @override
  List<Object> get props => [];
}

class SearchResultGoodsListInitial extends SearchResultGoodsListState {
  @override
  List<Object> get props => [];
}

/// 数据加载完毕
class SearchResultGoodsListLoadedState extends SearchResultGoodsListState {
  List<HomeGoodsModel> model;


  SearchResultGoodsListLoadedState({@required this.model});

  SearchResultGoodsListLoadedState copyWith(List<HomeGoodsModel> newData) {
    return SearchResultGoodsListLoadedState(model: newData ?? model);
  }

  @override
  List<Object> get props => [this.model];
}

/// 数据加载出错
class SearchResultGoodsListErrorState extends SearchResultGoodsListState {}

/// 切换样式成功
class SearchResultGoodsListChangeStyleState extends SearchResultGoodsListState {
  bool isShowOneColumn = true;
  List<HomeGoodsModel> model;

  SearchResultGoodsListChangeStyleState(this.isShowOneColumn, this.model);

  @override
  List<Object> get props => [this.isShowOneColumn];
}
