my_posts_state.dart 581 B

1234567891011121314151617181920212223
  1. class MyPostsState {
  2. int activeTabIdx = 0;
  3. List<Map<String, dynamic>>? tabsList;
  4. int currentPageViewIdx = 0;
  5. MyPostsState({
  6. this.activeTabIdx = 0,
  7. this.tabsList,
  8. required this.currentPageViewIdx,
  9. });
  10. MyPostsState copyWith({
  11. int? activeTabIdx,
  12. List<Map<String, dynamic>>? tabsList,
  13. int? currentPageViewIdx,
  14. }) {
  15. return MyPostsState(
  16. activeTabIdx: activeTabIdx ?? this.activeTabIdx,
  17. currentPageViewIdx: currentPageViewIdx ?? this.currentPageViewIdx,
  18. tabsList: tabsList ?? this.tabsList,
  19. );
  20. }
  21. }