class MyPostsState { int activeTabIdx = 0; List>? tabsList; int currentPageViewIdx = 0; MyPostsState({ this.activeTabIdx = 0, this.tabsList, required this.currentPageViewIdx, }); MyPostsState copyWith({ int? activeTabIdx, List>? tabsList, int? currentPageViewIdx, }) { return MyPostsState( activeTabIdx: activeTabIdx ?? this.activeTabIdx, currentPageViewIdx: currentPageViewIdx ?? this.currentPageViewIdx, tabsList: tabsList ?? this.tabsList, ); } }