import 'package:cims_apps/application/assets/path_assets.dart'; import 'package:cims_apps/application/theme/color_palette.dart'; import 'package:cims_apps/core/utils/size_config.dart'; import 'package:flutter/material.dart'; class GoalInvest { String icon; String title; GoalInvest(this.icon, this.title); } class GoalInvestingView extends StatelessWidget { const GoalInvestingView({super.key}); @override Widget build(BuildContext context) { List listGoalInvest = [ GoalInvest(PathAssets.iconToga, 'Education'), GoalInvest(PathAssets.iconCake, 'Marriage'), GoalInvest(PathAssets.iconHouse, 'Old age days'), GoalInvest(PathAssets.iconCreatePlan, 'Create Plan'), ]; return Column( children: listGoalInvest.asMap().entries.map((e) { return Padding( padding: EdgeInsets.only(top: e.key != 0 ? 16 : 0), child: ListTile( shape: RoundedRectangleBorder( side: BorderSide(color: ColorPalette.slate200), borderRadius: BorderRadius.circular(14) ), leading: Container( padding: EdgeInsets.all(4), decoration: BoxDecoration( color: ColorPalette.blue200.withOpacity(0.5), borderRadius: BorderRadius.circular(8) ), child: Image.asset( e.value.icon, width: SizeConfig.width * 0.07 ) ), contentPadding: EdgeInsets.symmetric(horizontal: 16, vertical: 4), title: Text(e.value.title, style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16 ), ), trailing: Icon(Icons.chevron_right_rounded), ), ); }).toList() ); } }