12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- import 'package:cs_resources/generated/assets.dart';
- import 'package:cs_resources/generated/l10n.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": S.current.ioan,
- "icon": Assets.propertyIoan,
- "pageStartInstanceFn": PropertyIoanPage.startInstance,
- "page": const PropertyIoanPage(),
- },
- {
- "title": S.current.news,
- "icon": Assets.propertyNews,
- "pageStartInstanceFn": PropertyNewsPage.startInstance,
- "page": const PropertyNewsPage(),
- },
- {
- "title": S.current.sale,
- "icon": Assets.propertySale,
- "pageStartInstanceFn": PropertySalePage.startInstance,
- "page": const PropertySalePage(),
- },
- {
- "title": S.current.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,
- );
- }
- }
|