123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import 'package:cs_resources/generated/assets.dart';
- import '../garagesale/garagesale_page.dart';
- import '../newsfeed/newsfeed_page.dart';
- class CommunityVmState {
- int? useTag = 0;
- List<Map<String, dynamic>>? topSectionsData;
- int? curIdx;
- dynamic? tabsRouter;
- dynamic? pageController;
- CommunityVmState({
- this.useTag = 0,
- List<Map<String, dynamic>>? topSectionsData,
- this.curIdx = 0,
- 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({
- int? useTag,
- List<Map<String, dynamic>>? topSectionsData,
- int? curIdx = 0,
- dynamic? tabsRouter,
- dynamic? pageController,
- }) {
- return CommunityVmState(
- useTag: useTag ?? this.useTag,
- topSectionsData: topSectionsData ?? this.topSectionsData,
- curIdx: curIdx ?? 0,
- tabsRouter: tabsRouter ?? this.tabsRouter,
- pageController: pageController ?? this.pageController,
- );
- }
- }
|