news_state.dart 833 B

1234567891011121314151617181920212223242526272829303132333435
  1. class NewsState {
  2. int? activeTabIndex =0;
  3. int? curPage =0;
  4. int? pageSize =10;
  5. int? filterCount =0;
  6. List<String>? tabsList = ['News', 'Following', 'For You'];
  7. List<Map<String, dynamic>>? list = [];
  8. NewsState({
  9. this.activeTabIndex,
  10. this.curPage,
  11. this.pageSize,
  12. this.filterCount,
  13. this.tabsList,
  14. this.list,
  15. });
  16. NewsState copyWith({
  17. int? activeTabIndex,
  18. int? curPage,
  19. int? pageSize,
  20. int? filterCount,
  21. List<String>? tabsList,
  22. List<Map<String, dynamic>>? list,
  23. }) {
  24. return NewsState(
  25. activeTabIndex: activeTabIndex ?? this.activeTabIndex,
  26. curPage: curPage ?? this.curPage,
  27. pageSize: pageSize ?? this.pageSize,
  28. filterCount: filterCount ?? this.filterCount,
  29. tabsList: tabsList ?? this.tabsList,
  30. list: list ?? this.list,
  31. );
  32. }
  33. }