my_following_state.dart 1.2 KB

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