fix: risk profile
This commit is contained in:
		| @@ -60,14 +60,6 @@ class SubmitBankAccount extends StatelessWidget { | ||||
|                       color: ColorPalette.slate400, | ||||
|                     ), | ||||
|                   ), | ||||
|                   // const Spacer(), | ||||
|                   // ButtonView( | ||||
|                   //   name: 'Next', | ||||
|                   //   onPressed: () { | ||||
|                   //     provider.nextSubmission(context); | ||||
|                   //     routePush(context, page: const ConfirmBankAccount()); | ||||
|                   //   }, | ||||
|                   // ) | ||||
|                 ], | ||||
|               ); | ||||
|             }), | ||||
|   | ||||
| @@ -1,19 +1,17 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.dart'; | ||||
| import 'package:cims_apps/application/component/button/back_button_view.dart'; | ||||
| import 'package:cims_apps/application/component/button/button_view.dart'; | ||||
| import 'package:cims_apps/application/component/image/image_view.dart'; | ||||
| import 'package:cims_apps/application/theme/color_palette.dart'; | ||||
| import 'package:cims_apps/core/route/route.dart'; | ||||
| import 'package:cims_apps/core/utils/size_config.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/registration_password_view.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/submission_data/risk_profile/risk_profile_view_model/risk_profile_view_model.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
|  | ||||
| class ResultsView extends StatelessWidget { | ||||
|   final String totalScore; | ||||
|   final RiskProfileResult typeResult; | ||||
|   const ResultsView({super.key, required this.typeResult, required this.totalScore}); | ||||
|   const ResultsView( | ||||
|       {super.key, required this.typeResult, required this.totalScore}); | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
| @@ -28,14 +26,11 @@ class ResultsView extends StatelessWidget { | ||||
|           children: [ | ||||
|             BackButtonView(), | ||||
|             const Text('Risk Profile', textAlign: TextAlign.center), | ||||
|             SizedBox( | ||||
|                 width: SizeConfig.width * 0.1 | ||||
|             ) | ||||
|             SizedBox(width: SizeConfig.width * 0.1) | ||||
|           ], | ||||
|         ), | ||||
|         shape: const RoundedRectangleBorder( | ||||
|             side: BorderSide(color: ColorPalette.slate200) | ||||
|         ), | ||||
|             side: BorderSide(color: ColorPalette.slate200)), | ||||
|       ), | ||||
|       body: SingleChildScrollView( | ||||
|         padding: EdgeInsets.all(24), | ||||
| @@ -46,9 +41,10 @@ class ResultsView extends StatelessWidget { | ||||
|               borderRadius: BorderRadius.circular(8), | ||||
|               child: Container( | ||||
|                 decoration: BoxDecoration( | ||||
|                   color: typeResult.color, | ||||
|                   image: DecorationImage(image: AssetImage(typeResult.img), alignment: Alignment.centerRight) | ||||
|                 ), | ||||
|                     color: typeResult.color, | ||||
|                     image: DecorationImage( | ||||
|                         image: AssetImage(typeResult.img), | ||||
|                         alignment: Alignment.centerRight)), | ||||
|                 child: Row( | ||||
|                   mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                   children: [ | ||||
| @@ -60,25 +56,26 @@ class ResultsView extends StatelessWidget { | ||||
|                           Text( | ||||
|                             typeResult.type, | ||||
|                             style: TextStyle( | ||||
|                               fontWeight: FontWeight.bold, | ||||
|                               fontSize: 24, | ||||
|                               color: ColorPalette.white | ||||
|                             ), | ||||
|                                 fontWeight: FontWeight.bold, | ||||
|                                 fontSize: 24, | ||||
|                                 color: ColorPalette.white), | ||||
|                           ), | ||||
|                           SizedBox(height: 16,), | ||||
|                           Text('Total Score :', | ||||
|                           SizedBox( | ||||
|                             height: 16, | ||||
|                           ), | ||||
|                           Text( | ||||
|                             'Total Score :', | ||||
|                             style: TextStyle( | ||||
|                                 fontWeight: FontWeight.bold, | ||||
|                                 fontSize: 16, | ||||
|                                 color: ColorPalette.white | ||||
|                             ), | ||||
|                                 color: ColorPalette.white), | ||||
|                           ), | ||||
|                           Text(totalScore, | ||||
|                           Text( | ||||
|                             totalScore, | ||||
|                             style: TextStyle( | ||||
|                                 fontWeight: FontWeight.bold, | ||||
|                                 fontSize: 28, | ||||
|                                 color: ColorPalette.white | ||||
|                             ), | ||||
|                                 color: ColorPalette.white), | ||||
|                           ) | ||||
|                         ], | ||||
|                       ), | ||||
| @@ -90,23 +87,17 @@ class ResultsView extends StatelessWidget { | ||||
|             SizedBox( | ||||
|               height: 24, | ||||
|             ), | ||||
|             Text( | ||||
|               typeResult.desc, | ||||
|               style: TextStyle( | ||||
|                 color: ColorPalette.slate500, | ||||
|                 fontSize: 16 | ||||
|               ) | ||||
|             ), | ||||
|             Text(typeResult.desc, | ||||
|                 style: TextStyle(color: ColorPalette.slate500, fontSize: 16)), | ||||
|             SizedBox( | ||||
|               height: 24, | ||||
|             ), | ||||
|             Text( | ||||
|               'Suitable Product', | ||||
|               style: TextStyle( | ||||
|                 color: ColorPalette.slate800, | ||||
|                 fontWeight: FontWeight.bold, | ||||
|                 fontSize: 16 | ||||
|               ), | ||||
|                   color: ColorPalette.slate800, | ||||
|                   fontWeight: FontWeight.bold, | ||||
|                   fontSize: 16), | ||||
|             ), | ||||
|             SizedBox( | ||||
|               height: 16, | ||||
| @@ -123,24 +114,24 @@ class ResultsView extends StatelessWidget { | ||||
|                   child: Row( | ||||
|                     children: [ | ||||
|                       Container( | ||||
|                         padding: EdgeInsets.all(8), | ||||
|                         alignment: Alignment.center, | ||||
|                         decoration: BoxDecoration( | ||||
|                           shape: BoxShape.circle, | ||||
|                           color: typeResult.color.withOpacity(0.1) | ||||
|                         ), | ||||
|                         child: Image.asset(e['icon'], width: SizeConfig.width * 0.07, color: typeResult.color) | ||||
|                       ), | ||||
|                           padding: EdgeInsets.all(8), | ||||
|                           alignment: Alignment.center, | ||||
|                           decoration: BoxDecoration( | ||||
|                               shape: BoxShape.circle, | ||||
|                               color: typeResult.color.withOpacity(0.1)), | ||||
|                           child: Image.asset(e['icon'], | ||||
|                               width: SizeConfig.width * 0.07, | ||||
|                               color: typeResult.color)), | ||||
|                       SizedBox( | ||||
|                         width: 12, | ||||
|                       ), | ||||
|                       Expanded( | ||||
|                         child: Text(e['desc'], | ||||
|                         child: Text( | ||||
|                           e['desc'], | ||||
|                           style: TextStyle( | ||||
|                             fontSize: 16, | ||||
|                             fontWeight: FontWeight.bold, | ||||
|                             color: ColorPalette.slate800 | ||||
|                           ), | ||||
|                               fontSize: 16, | ||||
|                               fontWeight: FontWeight.bold, | ||||
|                               color: ColorPalette.slate800), | ||||
|                         ), | ||||
|                       ) | ||||
|                     ], | ||||
| @@ -153,8 +144,7 @@ class ResultsView extends StatelessWidget { | ||||
|             ), | ||||
|             ButtonView( | ||||
|               name: 'Re-test', | ||||
|               onPressed: () { | ||||
|               }, | ||||
|               onPressed: () {}, | ||||
|               marginVertical: 0, | ||||
|               backgroundColor: ColorPalette.white, | ||||
|               textColor: ColorPalette.primary, | ||||
| @@ -171,6 +161,7 @@ class ResultsView extends StatelessWidget { | ||||
|             ButtonView( | ||||
|               name: 'Confirm', | ||||
|               onPressed: () { | ||||
|                 //TODO route ke terms condition | ||||
|                 routePush(context, page: DialogSuccess()); | ||||
|               }, | ||||
|               marginVertical: 0, | ||||
|   | ||||
| @@ -1,5 +1,4 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.dart'; | ||||
| import 'package:cims_apps/application/component/button/back_button_view.dart'; | ||||
| import 'package:cims_apps/application/component/button/button_view.dart'; | ||||
| import 'package:cims_apps/application/component/image/image_view.dart'; | ||||
| import 'package:cims_apps/application/theme/color_palette.dart'; | ||||
| @@ -13,93 +12,75 @@ class RiskProfileView extends StatelessWidget { | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Scaffold( | ||||
|       appBar: AppBar( | ||||
|         toolbarHeight: 70, | ||||
|         backgroundColor: Colors.white, | ||||
|         surfaceTintColor: Colors.white, | ||||
|         automaticallyImplyLeading: false, | ||||
|         title: Row( | ||||
|           mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|           children: [ | ||||
|             BackButtonView(), | ||||
|             const Text('Risk Profile', textAlign: TextAlign.center), | ||||
|             SizedBox(width: SizeConfig.width * 0.1) | ||||
|           ], | ||||
|         ), | ||||
|         shape: const RoundedRectangleBorder( | ||||
|             side: BorderSide(color: ColorPalette.slate200)), | ||||
|       ), | ||||
|       body: Container( | ||||
|         width: SizeConfig.width, | ||||
|         height: SizeConfig.height, | ||||
|         padding: EdgeInsets.all(24), | ||||
|         child: Column( | ||||
|           mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|           children: [ | ||||
|             Column( | ||||
|               children: [ | ||||
|                 ImageView(image: PathAssets.imgDataReport), | ||||
|                 SizedBox( | ||||
|                   height: 24, | ||||
|                 ), | ||||
|                 Text( | ||||
|                   'Know Your Risk Profile', | ||||
|                   textAlign: TextAlign.center, | ||||
|                   style: TextStyle( | ||||
|                       color: ColorPalette.slate800, | ||||
|                       fontWeight: FontWeight.bold, | ||||
|                       fontSize: 24), | ||||
|                 ), | ||||
|                 SizedBox( | ||||
|                   height: 12, | ||||
|                 ), | ||||
|                 Text( | ||||
|                   'We will provide recommendations that match your profile and risk tolerance level.', | ||||
|                   textAlign: TextAlign.center, | ||||
|                   style: TextStyle( | ||||
|                       fontSize: 16, | ||||
|                       fontWeight: FontWeight.w600, | ||||
|                       color: ColorPalette.slate500), | ||||
|                 ), | ||||
|               ], | ||||
|             ), | ||||
|             Column( | ||||
|               children: [ | ||||
|                 Row( | ||||
|                   mainAxisAlignment: MainAxisAlignment.center, | ||||
|                   children: [ | ||||
|                     ImageView( | ||||
|                       image: PathAssets.iconShield, | ||||
|                       width: 20, | ||||
|                       height: 22, | ||||
|                     ), | ||||
|                     SizedBox( | ||||
|                       width: 8, | ||||
|                     ), | ||||
|                     Text( | ||||
|                       'Your data is secure and encrypted', | ||||
|                       style: TextStyle( | ||||
|                           fontWeight: FontWeight.w600, | ||||
|                           color: ColorPalette.primary, | ||||
|                           fontSize: 16), | ||||
|                     ) | ||||
|                   ], | ||||
|                 ), | ||||
|                 SizedBox( | ||||
|                   height: 24, | ||||
|                 ), | ||||
|                 ButtonView( | ||||
|                   name: "Let's Start", | ||||
|                   onPressed: () { | ||||
|                     routePush(context, page: QuestionView()); | ||||
|                   }, | ||||
|                   marginVertical: 0, | ||||
|                 ) | ||||
|               ], | ||||
|             ) | ||||
|           ], | ||||
|         ), | ||||
|     return Container( | ||||
|       width: SizeConfig.width, | ||||
|       height: SizeConfig.height, | ||||
|       padding: EdgeInsets.all(24), | ||||
|       child: Column( | ||||
|         mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|         children: [ | ||||
|           Column( | ||||
|             children: [ | ||||
|               ImageView(image: PathAssets.imgDataReport), | ||||
|               SizedBox( | ||||
|                 height: 24, | ||||
|               ), | ||||
|               Text( | ||||
|                 'Know Your Risk Profile', | ||||
|                 textAlign: TextAlign.center, | ||||
|                 style: TextStyle( | ||||
|                     color: ColorPalette.slate800, | ||||
|                     fontWeight: FontWeight.bold, | ||||
|                     fontSize: 24), | ||||
|               ), | ||||
|               SizedBox( | ||||
|                 height: 12, | ||||
|               ), | ||||
|               Text( | ||||
|                 'We will provide recommendations that match your profile and risk tolerance level.', | ||||
|                 textAlign: TextAlign.center, | ||||
|                 style: TextStyle( | ||||
|                     fontSize: 16, | ||||
|                     fontWeight: FontWeight.w600, | ||||
|                     color: ColorPalette.slate500), | ||||
|               ), | ||||
|             ], | ||||
|           ), | ||||
|           Column( | ||||
|             children: [ | ||||
|               Row( | ||||
|                 mainAxisAlignment: MainAxisAlignment.center, | ||||
|                 children: [ | ||||
|                   ImageView( | ||||
|                     image: PathAssets.iconShield, | ||||
|                     width: 20, | ||||
|                     height: 22, | ||||
|                   ), | ||||
|                   SizedBox( | ||||
|                     width: 8, | ||||
|                   ), | ||||
|                   Text( | ||||
|                     'Your data is secure and encrypted', | ||||
|                     style: TextStyle( | ||||
|                         fontWeight: FontWeight.w600, | ||||
|                         color: ColorPalette.primary, | ||||
|                         fontSize: 16), | ||||
|                   ) | ||||
|                 ], | ||||
|               ), | ||||
|               SizedBox( | ||||
|                 height: 24, | ||||
|               ), | ||||
|               ButtonView( | ||||
|                 name: "Let's Start", | ||||
|                 onPressed: () { | ||||
|                   routePush(context, page: QuestionView()); | ||||
|                 }, | ||||
|                 marginVertical: 0, | ||||
|               ) | ||||
|             ], | ||||
|           ) | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
|   | ||||
| @@ -60,9 +60,7 @@ class _SubmissionParentState extends State<SubmissionParent> { | ||||
|       case 8: | ||||
|         return const RiskProfileView(); | ||||
|       case 9: | ||||
|         return Container( | ||||
|           child: Text("Step 9"), | ||||
|         ); | ||||
|         return const Text("Step 9"); | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -142,7 +140,8 @@ class _SubmissionParentState extends State<SubmissionParent> { | ||||
|                           ), | ||||
|                         ), | ||||
|                         provider.getCurrentStep == 3 || | ||||
|                                 provider.getCurrentStep == 4 | ||||
|                                 provider.getCurrentStep == 4 || | ||||
|                                 provider.getCurrentStep == 8 | ||||
|                             ? const SizedBox() | ||||
|                             : Align( | ||||
|                                 alignment: Alignment.bottomCenter, | ||||
|   | ||||
| @@ -18,24 +18,14 @@ class InitialSignature extends StatelessWidget { | ||||
|           ) | ||||
|         ], | ||||
|         builder: (context, child) { | ||||
|           return Column( | ||||
|           return const Column( | ||||
|             crossAxisAlignment: CrossAxisAlignment.start, | ||||
|             children: [ | ||||
|               const TextCaption(title: 'Draw your digital sign'), | ||||
|               const ImageView(image: PathAssets.frameSignature), | ||||
|               const ListTileView( | ||||
|               TextCaption(title: 'Draw your digital sign'), | ||||
|               ImageView(image: PathAssets.frameSignature), | ||||
|               ListTileView( | ||||
|                   title: | ||||
|                       'Make sure the sign you draw is match with your ID Card'), | ||||
|               // Consumer<SubmissionDataViewModel>( | ||||
|               //     builder: (context, provider, child) { | ||||
|               //   return ButtonView( | ||||
|               //     name: 'Next', | ||||
|               //     onPressed: () { | ||||
|               //       provider.nextSubmission(context); | ||||
|               //       routePush(context, page: const SubmitSignature()); | ||||
|               //     }, | ||||
|               //   ); | ||||
|               // }), | ||||
|             ], | ||||
|           ); | ||||
|         }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user