custom_tabs_state.dart 748 B

1234567891011121314151617181920212223242526272829
  1. import 'package:flutter/cupertino.dart';
  2. class CustomTabsState {
  3. List? tabsList;
  4. int? activeIndex;
  5. Widget? Function(BuildContext)? tabItemBuilder;
  6. VoidCallback? onClickAction;
  7. CustomTabsState({
  8. this.tabsList,
  9. this.activeIndex,
  10. this.tabItemBuilder,
  11. this.onClickAction,
  12. });
  13. CustomTabsState copyWith({
  14. List? tabsList,
  15. int? activeIndex,
  16. Widget? Function(BuildContext)? tabItemBuilder,
  17. VoidCallback? onClickAction,
  18. }) {
  19. return CustomTabsState(
  20. tabsList: tabsList ?? this.tabsList,
  21. activeIndex: activeIndex ?? this.activeIndex,
  22. tabItemBuilder: tabItemBuilder ?? this.tabItemBuilder,
  23. onClickAction: onClickAction ?? this.onClickAction,
  24. );
  25. }
  26. }