import 'package:widgets/load_state_layout.dart'; class HomeServiceState { //页面 LoadView 状态的展示 LoadState loadingState; String? errorMessage; String? keyword; bool? isLiked; Map activeSortMap; List> activeCateGoryList; List> list; HomeServiceState({ this.loadingState = LoadState.State_Loading, String? errorMessage, this.keyword, this.isLiked, this.activeSortMap = const {}, this.activeCateGoryList = const [], required this.list, }); HomeServiceState copyWith({ LoadState? loadingState, String? errorMessage, String? keyword, bool? isLiked, Map? activeSortMap, List>? activeCateGoryList, List>? list, }) { return HomeServiceState( loadingState: loadingState ?? this.loadingState, errorMessage: errorMessage ?? this.errorMessage, keyword: keyword ?? this.keyword, isLiked: isLiked ?? this.isLiked, activeSortMap: activeSortMap ?? this.activeSortMap, activeCateGoryList: activeCateGoryList ?? this.activeCateGoryList, list: list ?? this.list, ); } }