12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import 'package:cpt_community/modules/community/community_page.dart';
- import 'package:cs_resources/generated/assets.dart';
- import '../garage/garage_page.dart';
- class CommunityVmState {
- List<Map<String, dynamic>>? topSectionsData;
- List? tabsList = ["News", "Following", "For You"];
- dynamic? tabsRouter;
- dynamic? pageController;
- CommunityVmState({
- List<Map<String, dynamic>>? topSectionsData,
- this.tabsList,
- this.tabsRouter,
- this.pageController,
- }) : topSectionsData = topSectionsData?? [
- {
- "title": "News Feed",
- "icon": Assets.communityNesFeed,
- "pageStartInstanceFn": CommunityPage.startInstance,
- "page": const CommunityPage(),
- },
- {
- "title": "Garage Sale",
- "icon": Assets.communityGarageSale,
- "pageStartInstanceFn": GaragePage.startInstance,
- "page": const GaragePage(),
- },
- ];
- CommunityVmState copyWith({
- List<Map<String, dynamic>>? topSectionsData,
- List? tabsList,
- dynamic? tabsRouter,
- dynamic? pageController,
- }) {
- return CommunityVmState(
- topSectionsData: topSectionsData ?? this.topSectionsData,
- tabsList: tabsList ?? this.tabsList,
- tabsRouter: tabsRouter ?? this.tabsRouter,
- pageController: pageController ?? this.pageController,
- );
- }
- }
|