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>? topSectionsData; int? currentPageViewIdx; PropertyVmState({ List>? 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>? topSectionsData, int? currentPageViewIdx = 0, }) { return PropertyVmState( topSectionsData: topSectionsData ?? this.topSectionsData, currentPageViewIdx: currentPageViewIdx ?? 0, ); } }