1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- import 'package:cs_resources/generated/assets.dart';
- import 'package:cs_resources/generated/l10n.dart';
- import 'package:domain/entity/home_list_entity.dart';
- class HomeState {
- final List<Map<String, dynamic>> homeCategory;
- final List<Map<String, dynamic>> lastNews;
- HomeListEntity? homeIndex;
- HomeState({
- List<Map<String, dynamic>>? homeCategory,
- List<Map<String, dynamic>>? lastNews,
- this.homeIndex,
- }) : homeCategory = homeCategory ??
- [
- {
- 'category_name': S.current.facility,
- 'category_icon': Assets.mainHomeFacilityIcon,
- },
- {
- 'category_name': S.current.form,
- 'category_icon': Assets.mainHomeFormsIcon,
- },
- {
- 'category_name': S.current.notice_board,
- 'category_icon': Assets.mainHomeBoticeBoardIcon,
- },
- {
- 'category_name': S.current.property,
- 'category_icon': Assets.mainHomePropertyIcon,
- },
- {
- 'category_name': S.current.service,
- 'category_icon': Assets.mainHomeServiceIcon,
- },
- {
- 'category_name': S.current.community,
- 'category_icon': Assets.mainHomeCommunityIcon,
- }
- ],
- lastNews = lastNews ??
- [
- {
- 'category_name': S.current.property,
- 'category_icon': Assets.mainHomePropertyNews,
- 'icon_width': 38.5,
- 'icon_height': 39.5,
- 'margin_right': 13.0,
- },
- {
- 'category_name': S.current.internal,
- 'category_icon': Assets.mainHomeInternalNews,
- 'icon_width': 33.5,
- 'icon_height': 41.0,
- 'margin_right': 11.0,
- },
- {
- 'category_name': S.current.info,
- 'category_icon': Assets.mainHomeInfoNews,
- 'icon_width': 44.0,
- 'icon_height': 42.0,
- 'margin_right': 6.0,
- },
- {
- 'category_name': S.current.notice,
- 'category_icon': Assets.mainHomePublishNews,
- 'icon_width': 40.5,
- 'icon_height': 42.5,
- 'margin_right': 11.0,
- }
- ];
- HomeState copyWith({
- HomeListEntity? homeIndex,
- }) {
- return HomeState(
- homeIndex: homeIndex ?? this.homeIndex,
- homeCategory: homeCategory,
- lastNews: lastNews,
- );
- }
- }
|