my_following_state.dart 875 B

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