123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import 'package:domain/entity/paid_service_entity.dart';
- import 'package:widgets/load_state_layout.dart';
- class HomeServiceState {
- //页面 LoadView 状态的展示
- LoadState loadingState;
- String? errorMessage;
- String? keyword;
- bool? isLiked;
- // contact type 类型选项
- final List<String> sortByOptionsList = ["Most Likes", "Most bookmarked", "View at Most"];
- String? sortBySelectedOption;
- List<PaidServiceList> activeCateGoryList;
- List<PaidServiceList> list;
- HomeServiceState({
- this.loadingState = LoadState.State_Loading,
- String? errorMessage,
- this.keyword,
- this.isLiked,
- this.sortBySelectedOption ,
- this.activeCateGoryList = const [],
- required this.list,
- });
- HomeServiceState copyWith({
- LoadState? loadingState,
- String? errorMessage,
- String? keyword,
- bool? isLiked,
- String? sortBySelectedOption,
- List<PaidServiceList>? activeCateGoryList,
- List<PaidServiceList>? list,
- }) {
- return HomeServiceState(
- loadingState: loadingState ?? this.loadingState,
- errorMessage: errorMessage ?? this.errorMessage,
- keyword: keyword ?? this.keyword,
- isLiked: isLiked ?? this.isLiked,
- sortBySelectedOption: sortBySelectedOption ?? this.sortBySelectedOption,
- activeCateGoryList: activeCateGoryList ?? this.activeCateGoryList,
- list: list ?? this.list,
- );
- }
- }
|