1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import 'package:cs_resources/generated/assets.dart';
- import '../garagesale/garagesale_page.dart';
- import '../newsfeed/newsfeed_page.dart';
- class CommunityVmState {
- List<Map<String, dynamic>>? topSectionsData;
- List? tabsList = ["News", "Following", "For You"];
- int? activeTabIdx = 0;
- dynamic? tabsRouter;
- dynamic? pageController;
- CommunityVmState({
- List<Map<String, dynamic>>? topSectionsData,
- this.tabsList,
- this.activeTabIdx,
- this.tabsRouter,
- this.pageController,
- }) : topSectionsData = topSectionsData?? [
- {
- "title": "News Feed",
- "icon": Assets.communityNesFeed,
- "pageStartInstanceFn": NewsfeedPage.startInstance,
- "page": const NewsfeedPage(),
- },
- {
- "title": "Garage Sale",
- "icon": Assets.communityGarageSale,
- "pageStartInstanceFn": GaragesalePage.startInstance,
- "page": const GaragesalePage(),
- },
- ];
- CommunityVmState copyWith({
- List<Map<String, dynamic>>? topSectionsData,
- List? tabsList,
- int? activeTabIdx,
- dynamic? tabsRouter,
- dynamic? pageController,
- }) {
- return CommunityVmState(
- topSectionsData: topSectionsData ?? this.topSectionsData,
- tabsList: tabsList ?? this.tabsList,
- activeTabIdx: activeTabIdx ?? this.activeTabIdx,
- tabsRouter: tabsRouter ?? this.tabsRouter,
- pageController: pageController ?? this.pageController,
- );
- }
- }
|