my_following_state.dart 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import 'package:cpt_community/modules/my_following/tabs_data.dart';
  2. class MyFollowingState {
  3. List<String>? tabsList;
  4. int? currentPageViewIdx = 0;
  5. int? followerCount;
  6. int? followCount;
  7. bool? followPageIsSearchBarStatus = false;
  8. bool? followerPageIsSearchBarStatus = false;
  9. MyFollowingState({
  10. tabsList,
  11. this.followerCount = 0,
  12. this.followCount = 0,
  13. this.currentPageViewIdx = 0,
  14. this.followPageIsSearchBarStatus = false,
  15. this.followerPageIsSearchBarStatus = false,
  16. }) : tabsList = tabsList ?? [
  17. tabsNamesData['Follow'],
  18. tabsNamesData['Follower'],
  19. ];
  20. MyFollowingState copyWith({
  21. List<String>? tabsList,
  22. int? currentPageViewIdx,
  23. int? activeTabIdx,
  24. int? followerCount,
  25. int? followCount,
  26. bool? followPageIsSearchBarStatus,
  27. bool? followerPageIsSearchBarStatus,
  28. }) {
  29. return MyFollowingState(
  30. tabsList: tabsList ?? this.tabsList,
  31. currentPageViewIdx: currentPageViewIdx ?? this.currentPageViewIdx,
  32. followerCount: followerCount ?? this.followerCount,
  33. followCount: followCount ?? this.followCount,
  34. followPageIsSearchBarStatus: followPageIsSearchBarStatus ?? this.followPageIsSearchBarStatus,
  35. followerPageIsSearchBarStatus: followerPageIsSearchBarStatus ?? this.followerPageIsSearchBarStatus,
  36. );
  37. }
  38. }