123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import 'package:cs_resources/generated/assets.dart';
- import '../../ioan/property_ioan_page.dart';
- import '../../news/page/property_news_page.dart';
- import '../../rent/page/property_rent_page.dart';
- import '../../sale/page/property_sale_page.dart';
- class PropertyVmState {
- List<Map<String, dynamic>>? topSectionsData;
- int? currentPageViewIdx;
- PropertyVmState({
- List<Map<String, dynamic>>? topSectionsData,
- this.currentPageViewIdx = 0,
- }) : topSectionsData = topSectionsData?? [
- {
- "title": "Ioan",
- "icon": Assets.propertyIoan,
- "pageStartInstanceFn": PropertyIoanPage.startInstance,
- "page": const PropertyIoanPage(),
- },
- {
- "title": "News",
- "icon": Assets.propertyNews,
- "pageStartInstanceFn": PropertyNewsPage.startInstance,
- "page": const PropertyNewsPage(),
- },
- {
- "title": "Sale",
- "icon": Assets.propertySale,
- "pageStartInstanceFn": PropertySalePage.startInstance,
- "page": const PropertySalePage(),
- },
- {
- "title": "Rent",
- "icon": Assets.propertyRent,
- "pageStartInstanceFn": PropertyRentPage.startInstance,
- "page": const PropertyRentPage(),
- },
- ];
- PropertyVmState copyWith({
- List<Map<String, dynamic>>? topSectionsData,
- int? currentPageViewIdx = 0,
- }) {
- return PropertyVmState(
- topSectionsData: topSectionsData ?? this.topSectionsData,
- currentPageViewIdx: currentPageViewIdx ?? 0,
- );
- }
- }
|