repair_state.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import 'package:cs_resources/generated/assets.dart';
  2. class RepairVmState {
  3. List<Map<String, dynamic>>? topSectionsData;
  4. int currentPageViewIdx = 0;
  5. dynamic? tabsRouter;
  6. RepairVmState({
  7. List<Map<String, dynamic>>? topSectionsData,
  8. required this.currentPageViewIdx,
  9. this.tabsRouter,
  10. }) : topSectionsData = topSectionsData?? [
  11. {
  12. "title": "Service",
  13. "code": "service",
  14. "icon": Assets.serviceServiceType,
  15. },
  16. {
  17. "title": "In Progress",
  18. "code": "inProgress",
  19. "icon": Assets.serviceInProgress,
  20. },
  21. {
  22. "title": "History",
  23. "code": "history",
  24. "icon": Assets.serviceHistory,
  25. },
  26. ];
  27. RepairVmState copyWith({
  28. List<Map<String, dynamic>>? topSectionsData,
  29. int? currentPageViewIdx,
  30. dynamic? tabsRouter,
  31. }) {
  32. return RepairVmState(
  33. topSectionsData: topSectionsData ?? this.topSectionsData,
  34. currentPageViewIdx: currentPageViewIdx ?? this.currentPageViewIdx,
  35. tabsRouter: tabsRouter ?? this.tabsRouter,
  36. );
  37. }
  38. }