Compare commits
	
		
			19 Commits
		
	
	
		
			99db140a0c
			...
			83211e76f9
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 83211e76f9 | |||
| 57a4e828c9 | |||
| 466d49312d | |||
| 9ba8b79112 | |||
| 4f50dc951a | |||
| d66a9e3435 | |||
| 8e04b4e77e | |||
| afc2bd3cc9 | |||
| 66ace5b217 | |||
| 5cb76fca7f | |||
| e86e67b9c9 | |||
| a6248520ef | |||
| eb1eb83d52 | |||
| 7706fe4387 | |||
| 9da1675250 | |||
| 298d7f46d2 | |||
| 368f326123 | |||
| a574f30424 | |||
| ce2bf8a777 | 
							
								
								
									
										
											BIN
										
									
								
								assets/icons/icon-ceklis-outline.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/icons/icon-ceklis-outline.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 3.8 KiB | 
							
								
								
									
										
											BIN
										
									
								
								assets/icons/icon-lock.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/icons/icon-lock.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 4.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								assets/images/frame-signature.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/images/frame-signature.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 38 KiB | 
							
								
								
									
										
											BIN
										
									
								
								assets/images/img-finish.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/images/img-finish.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 105 KiB | 
| @@ -37,6 +37,9 @@ class PathAssets { | ||||
|   static const String iconHouse = 'assets/icons/icon-house.png'; | ||||
|   static const String iconToga = 'assets/icons/icon-toga.png'; | ||||
|   static const String iconCreatePlan = 'assets/icons/icon-create-plan.png'; | ||||
|   static const String iconChecklistOutlined = | ||||
|       'assets/icons/icon-ceklis-outline.png'; | ||||
|   static const String iconLock = 'assets/icons/icon-lock.png'; | ||||
|   static const String iconThumb = 'assets/icons/icon-thumb.png'; | ||||
|   static const String iconPortofolio = 'assets/icons/icon-portofolio.png'; | ||||
|   static const String iconPlane = 'assets/icons/icon-plane.png'; | ||||
| @@ -81,4 +84,6 @@ class PathAssets { | ||||
|   static const String imgGuide2 = 'assets/images/img-guide2.png'; | ||||
|   static const String imgOpenShopping = 'assets/images/img-open-shopping.png'; | ||||
|   static const String imgPaymentSuccess = 'assets/images/img-payment-success.png'; | ||||
|   static const String frameSignature = 'assets/images/frame-signature.png'; | ||||
|   static const String imgFinish = 'assets/images/img-finish.png'; | ||||
| } | ||||
|   | ||||
							
								
								
									
										70
									
								
								lib/application/component/list_tile/list_tile_view.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								lib/application/component/list_tile/list_tile_view.dart
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,70 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.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/utils/size_config.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
|  | ||||
| class ListTileView extends StatelessWidget { | ||||
|   final String title; | ||||
|   final VoidCallback? onPressed; | ||||
|   final Widget? prefixIcon, suffixIcon; | ||||
|   final Color? colorTitle; | ||||
|   const ListTileView( | ||||
|       {Key? key, | ||||
|       required this.title, | ||||
|       this.onPressed, | ||||
|       this.prefixIcon, | ||||
|       this.suffixIcon, | ||||
|       this.colorTitle}) | ||||
|       : super(key: key); | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Container( | ||||
|       width: SizeConfig.width, | ||||
|       padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 8.0), | ||||
|       margin: const EdgeInsets.symmetric(vertical: 16.0), | ||||
|       decoration: BoxDecoration( | ||||
|         color: ColorPalette.blue50, | ||||
|         borderRadius: BorderRadius.circular(10), | ||||
|         border: Border.all( | ||||
|           color: ColorPalette.greyLights, | ||||
|           width: 1, | ||||
|         ), | ||||
|       ), | ||||
|       child: Row( | ||||
|         mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|         children: [ | ||||
|           prefixIcon ?? | ||||
|               const ImageView( | ||||
|                 image: PathAssets.iconChecklistOutlined, | ||||
|                 width: 38, | ||||
|                 height: 38, | ||||
|               ), | ||||
|           const SizedBox( | ||||
|             width: 16, | ||||
|           ), | ||||
|           Expanded( | ||||
|             child: Text( | ||||
|               title, | ||||
|               style: TextStyle( | ||||
|                 fontWeight: FontWeight.w600, | ||||
|                 color: colorTitle ?? ColorPalette.slate500, | ||||
|               ), | ||||
|             ), | ||||
|           ), | ||||
|           suffixIcon != null | ||||
|               ? IconButton( | ||||
|                   onPressed: onPressed, | ||||
|                   icon: const Icon( | ||||
|                     Icons.arrow_forward_ios, | ||||
|                     color: ColorPalette.primary, | ||||
|                     size: 20, | ||||
|                   ), | ||||
|                 ) | ||||
|               : const SizedBox(), | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @@ -1,3 +1,4 @@ | ||||
| import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.dart'; | ||||
| import 'package:cims_apps/application/component/otp/otp_viewmodel.dart'; | ||||
| import 'package:cims_apps/application/component/text_caption/text_caption.dart'; | ||||
| import 'package:cims_apps/application/theme/color_palette.dart'; | ||||
| @@ -112,10 +113,8 @@ class OtpView extends StatelessWidget { | ||||
|         create: (context) => OtpViewModel(), | ||||
|         builder: (context, child) { | ||||
|           return Scaffold( | ||||
|             appBar: AppBar( | ||||
|               title: Text(title), | ||||
|             ), | ||||
|             body: Container( | ||||
|             appBar: CustomAppBar(height: SizeConfig.height * .1, title: title), | ||||
|             body: SingleChildScrollView( | ||||
|               padding: const EdgeInsets.all(16.0), | ||||
|               child: | ||||
|                   Consumer<OtpViewModel>(builder: (context, provider, child) { | ||||
|   | ||||
| @@ -9,7 +9,7 @@ class ItemSelectForm { | ||||
|   final String text; | ||||
|   final String? description; | ||||
|   final bool isOther; | ||||
|   final String image; | ||||
|   String image; | ||||
|  | ||||
|   ItemSelectForm( | ||||
|     this.key, | ||||
| @@ -25,7 +25,6 @@ class SelectFormView extends StatelessWidget { | ||||
|   final String? hintText; | ||||
|   final TextStyle? hintTextStyle; | ||||
|   final TextEditingController? ctrl; | ||||
|   final Widget? bottomSheetTitle; | ||||
|   final List<ItemSelectForm> listItem; | ||||
|   final ValueChanged<String> onSelect; | ||||
|   final FormFieldValidator<String>? validator; | ||||
| @@ -37,7 +36,6 @@ class SelectFormView extends StatelessWidget { | ||||
|       this.hintText, | ||||
|       this.hintTextStyle, | ||||
|       this.ctrl, | ||||
|       this.bottomSheetTitle, | ||||
|       required this.listItem, | ||||
|       required this.onSelect, | ||||
|       this.validator, | ||||
| @@ -56,48 +54,71 @@ class SelectFormView extends StatelessWidget { | ||||
|           ), | ||||
|         ), | ||||
|         builder: (BuildContext context) { | ||||
|           ItemSelectForm? selectedForm; | ||||
|           String? selectedKey; | ||||
|           if (listItem.isNotEmpty) { | ||||
|             var res = listItem.where((element) => element.key == selectedKey); | ||||
|             if (res.isNotEmpty) { | ||||
|               selectedForm = res.first; | ||||
|             } | ||||
|           } | ||||
|           return StatefulBuilder(builder: ( | ||||
|             BuildContext context, | ||||
|             StateSetter stateSetter, | ||||
|           ) { | ||||
|             return Container( | ||||
|               height: SizeConfig.height * .45, | ||||
|               decoration: const BoxDecoration( | ||||
|                 color: Colors.white, | ||||
|                 borderRadius: BorderRadius.vertical( | ||||
|                   top: Radius.circular(20), | ||||
|                 ), | ||||
|               ), | ||||
|               padding: const EdgeInsets.all(16), | ||||
|               child: Column( | ||||
|                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                 children: [ | ||||
|                   bottomSheetTitle ?? Container(), | ||||
|                   // const SizedBox(height: 16), | ||||
|                   Row( | ||||
|                     mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                     children: [ | ||||
|                       Text( | ||||
|                         name, | ||||
|                         style: const TextStyle( | ||||
|                           color: ColorPalette.slate800, | ||||
|                           fontSize: 16, | ||||
|                           fontWeight: FontWeight.w600, | ||||
|                         ), | ||||
|                       ), | ||||
|                       IconButton( | ||||
|                           onPressed: () => Navigator.pop(context), | ||||
|                           icon: const Icon( | ||||
|                             Icons.clear, | ||||
|                             size: 26, | ||||
|                             color: ColorPalette.greyBase, | ||||
|                           )), | ||||
|                     ], | ||||
|                   ), | ||||
|                   const SizedBox(height: 16), | ||||
|                   Expanded( | ||||
|                     child: SingleChildScrollView( | ||||
|                       scrollDirection: Axis.vertical, | ||||
|                       child: Column( | ||||
|                         children: [ | ||||
|                           ...listItem.map( | ||||
|                             (e) => Card( | ||||
|                           ...listItem.map((e) { | ||||
|                             bool selected = e.text == ctrl?.text; | ||||
|                             return Card( | ||||
|                               elevation: 0, | ||||
|                               color: Colors.transparent, | ||||
|                               shape: const RoundedRectangleBorder( | ||||
|                               color: Colors.white, | ||||
|                               shape: RoundedRectangleBorder( | ||||
|                                 side: BorderSide( | ||||
|                                   color: ColorPalette.greyBorder, | ||||
|                                   color: selected | ||||
|                                       ? ColorPalette.primary | ||||
|                                       : ColorPalette.greyBorder, | ||||
|                                 ), | ||||
|                                 borderRadius: | ||||
|                                     BorderRadius.all(Radius.circular(12)), | ||||
|                                     const BorderRadius.all(Radius.circular(12)), | ||||
|                               ), | ||||
|                               child: ListTile( | ||||
|                                 title: Text( | ||||
|                                   e.text, | ||||
|                                   style: const TextStyle( | ||||
|                                     fontSize: 14, | ||||
|                                   ), | ||||
|                                   style: TextStyle( | ||||
|                                       fontSize: 16, | ||||
|                                       fontWeight: FontWeight.w500, | ||||
|                                       color: selected | ||||
|                                           ? ColorPalette.primary | ||||
|                                           : ColorPalette.slate500), | ||||
|                                 ), | ||||
|                                 subtitle: e.description != null | ||||
|                                     ? Text( | ||||
| @@ -106,37 +127,19 @@ class SelectFormView extends StatelessWidget { | ||||
|                                         overflow: TextOverflow.ellipsis, | ||||
|                                       ) | ||||
|                                     : null, | ||||
|                                 // trailing: const Icon( | ||||
|                                 //   Icons.check_circle, | ||||
|                                 //   color: ColorPalette.primary, | ||||
|                                 // ), | ||||
|                                 trailing: Radio( | ||||
|                                   focusColor: ColorPalette.primary, | ||||
|                                   activeColor: ColorPalette.primary, | ||||
|                                   visualDensity: const VisualDensity( | ||||
|                                     horizontal: VisualDensity.minimumDensity, | ||||
|                                     vertical: VisualDensity.minimumDensity, | ||||
|                                   ), | ||||
|                                   materialTapTargetSize: | ||||
|                                       MaterialTapTargetSize.shrinkWrap, | ||||
|                                   value: e.key, | ||||
|                                   groupValue: selectedKey, | ||||
|                                   onChanged: (value) { | ||||
|                                     // selectedForm = | ||||
|                                     //     ItemSelectForm(e.key, e.text); | ||||
|                                     // stateSetter(() { | ||||
|                                     //   selectedKey = selectedForm!.key; | ||||
|                                     // }); | ||||
|                                   }, | ||||
|                                 ), | ||||
|                                 trailing: selected | ||||
|                                     ? const Icon(Icons.check_circle_rounded, | ||||
|                                         color: ColorPalette.primary) | ||||
|                                     : null, | ||||
|                                 onTap: () { | ||||
|                                   ctrl?.text = e.text; | ||||
|                                   onSelect(e.key); | ||||
|                                   Navigator.of(context).pop(); | ||||
|                                   stateSetter(() { | ||||
|                                     ctrl?.text = e.text; | ||||
|                                     onSelect(e.key); | ||||
|                                   }); | ||||
|                                 }, | ||||
|                               ), | ||||
|                             ), | ||||
|                           ), | ||||
|                             ); | ||||
|                           }), | ||||
|                         ], | ||||
|                       ), | ||||
|                     ), | ||||
| @@ -145,7 +148,7 @@ class SelectFormView extends StatelessWidget { | ||||
|                     name: 'Select', | ||||
|                     marginVertical: 4.0, | ||||
|                     onPressed: () { | ||||
|                       // print('object $') | ||||
|                       Navigator.pop(context); | ||||
|                     }, | ||||
|                   ) | ||||
|                 ], | ||||
|   | ||||
							
								
								
									
										135
									
								
								lib/application/component/set_pin_view/set_pin_view.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										135
									
								
								lib/application/component/set_pin_view/set_pin_view.dart
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,135 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.dart'; | ||||
| import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.dart'; | ||||
| import 'package:cims_apps/application/component/image/image_view.dart'; | ||||
| import 'package:cims_apps/application/component/set_pin_view/set_pin_viewmodel.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_success_view.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:pinput/pinput.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
|  | ||||
| class SetPinView extends StatelessWidget { | ||||
|   final String currentPin; | ||||
|   final void Function(BuildContext context, String pin) submitPin; | ||||
|  | ||||
|   const SetPinView({ | ||||
|     Key? key, | ||||
|     required this.currentPin, | ||||
|     required this.submitPin, | ||||
|   }) : super(key: key); | ||||
|  | ||||
|   Widget _stepItem({bool isCurrentStep = false, bool isDone = false}) { | ||||
|     return Container( | ||||
|       margin: | ||||
|           const EdgeInsets.only(right: 4.0, left: 4.0, top: 16.0, bottom: 40.0), | ||||
|       height: 6, | ||||
|       width: SizeConfig.width * .08, | ||||
|       decoration: BoxDecoration( | ||||
|         color: isCurrentStep || isDone | ||||
|             ? ColorPalette.primary | ||||
|             : ColorPalette.greyBorderNeutrals, | ||||
|         borderRadius: BorderRadius.circular(50), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     final textTheme = Theme.of(context).textTheme; | ||||
|     final pinInputController = TextEditingController(); | ||||
|     const pinInputLength = 6; | ||||
|     const defaultPinTheme = PinTheme( | ||||
|       margin: EdgeInsets.symmetric(horizontal: 4.0, vertical: 16.0), | ||||
|       textStyle: TextStyle( | ||||
|         fontSize: 22, | ||||
|         color: Colors.black, | ||||
|         fontWeight: FontWeight.w600, | ||||
|       ), | ||||
|       decoration: BoxDecoration(), | ||||
|     ); | ||||
|  | ||||
|     final pInputFocusNode = FocusNode(); | ||||
|  | ||||
|     final focusedPinTheme = defaultPinTheme.copyWith( | ||||
|       decoration: defaultPinTheme.decoration?.copyWith(), | ||||
|     ); | ||||
|  | ||||
|     final submittedPinTheme = defaultPinTheme.copyWith( | ||||
|       decoration: defaultPinTheme.decoration?.copyWith(), | ||||
|     ); | ||||
|     final followingPinTheme = defaultPinTheme.copyWith( | ||||
|       width: 13, | ||||
|       height: 13, | ||||
|       textStyle: const TextStyle( | ||||
|         fontSize: 16, | ||||
|         color: Color.fromRGBO(30, 60, 87, 1), | ||||
|         fontWeight: FontWeight.w600, | ||||
|       ), | ||||
|       decoration: defaultPinTheme.decoration?.copyWith( | ||||
|         color: ColorPalette.white, | ||||
|         border: Border.all(color: ColorPalette.slate300), | ||||
|         borderRadius: BorderRadius.circular(100), | ||||
|       ), | ||||
|     ); | ||||
|     return ChangeNotifierProvider( | ||||
|         create: (context) => SetPinViewModel(), | ||||
|         builder: (context, child) { | ||||
|           return Scaffold( | ||||
|             appBar: CustomAppBar( | ||||
|                 height: SizeConfig.height * .1, title: 'Registration'), | ||||
|             body: SingleChildScrollView( | ||||
|               padding: const EdgeInsets.symmetric(horizontal: 16.0), | ||||
|               child: Consumer<SetPinViewModel>( | ||||
|                   builder: (context, provider, child) { | ||||
|                 return Column( | ||||
|                   crossAxisAlignment: CrossAxisAlignment.center, | ||||
|                   children: [ | ||||
|                     Row( | ||||
|                       children: List.generate( | ||||
|                         9, | ||||
|                         (index) => _stepItem(isCurrentStep: true, isDone: true), | ||||
|                       ), | ||||
|                     ), | ||||
|                     ImageView( | ||||
|                       image: PathAssets.iconLock, | ||||
|                       width: SizeConfig.width * .15, | ||||
|                     ), | ||||
|                     Text( | ||||
|                       !provider.isPinCompleted | ||||
|                           ? 'Set your PIN' | ||||
|                           : 'Confirm your PIN', | ||||
|                       style: textTheme.headlineLarge, | ||||
|                     ), | ||||
|                     Pinput( | ||||
|                       onCompleted: (pin) { | ||||
|                         if (!provider.isPinCompleted) { | ||||
|                           provider.changePin(); | ||||
|                           pinInputController.clear(); | ||||
|                         } else { | ||||
|                           routePush(context, | ||||
|                               routeType: RouteType.pushReplace, | ||||
|                               page: const RegistrationSuccessView()); | ||||
|                         } | ||||
|                       }, | ||||
|                       keyboardType: TextInputType.number, | ||||
|                       obscureText: true, | ||||
|                       autofocus: true, | ||||
|                       isCursorAnimationEnabled: false, | ||||
|                       length: pinInputLength, | ||||
|                       controller: pinInputController, | ||||
|                       defaultPinTheme: defaultPinTheme, | ||||
|                       focusNode: pInputFocusNode, | ||||
|                       focusedPinTheme: focusedPinTheme, | ||||
|                       submittedPinTheme: submittedPinTheme, | ||||
|                       followingPinTheme: followingPinTheme, | ||||
|                     ), | ||||
|                   ], | ||||
|                 ); | ||||
|               }), | ||||
|             ), | ||||
|           ); | ||||
|         }); | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,9 @@ | ||||
| import 'package:flutter/material.dart'; | ||||
|  | ||||
| class SetPinViewModel extends ChangeNotifier { | ||||
|   bool isPinCompleted = false; | ||||
|   void changePin() { | ||||
|     isPinCompleted = !isPinCompleted; | ||||
|     notifyListeners(); | ||||
|   } | ||||
| } | ||||
| @@ -11,13 +11,34 @@ import 'package:cims_apps/features/auth/registration/view/submission_data/submis | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
| import 'package:shared_preferences/shared_preferences.dart'; | ||||
|  | ||||
| class DisplayPictureScreen extends StatelessWidget { | ||||
| class DisplayPictureScreen extends StatefulWidget { | ||||
|   final String imagePath, content; | ||||
|  | ||||
|   const DisplayPictureScreen( | ||||
|       {super.key, required this.imagePath, required this.content}); | ||||
|  | ||||
|   @override | ||||
|   State<DisplayPictureScreen> createState() => _DisplayPictureScreenState(); | ||||
| } | ||||
|  | ||||
| class _DisplayPictureScreenState extends State<DisplayPictureScreen> { | ||||
|   Future<void> saveData() async { | ||||
|     SharedPreferences prefs = await SharedPreferences.getInstance(); | ||||
|     if (widget.content == 'ktp') { | ||||
|       prefs.setString('imagePath', widget.imagePath); | ||||
|     } else { | ||||
|       prefs.setString('imagePathSelfie', widget.imagePath); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   @override | ||||
|   void initState() { | ||||
|     saveData(); | ||||
|     super.initState(); | ||||
|   } | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     List listIcons = [ | ||||
| @@ -85,7 +106,7 @@ class DisplayPictureScreen extends StatelessWidget { | ||||
|                       SizedBox( | ||||
|                           width: SizeConfig.width, | ||||
|                           height: SizeConfig.height * .4, | ||||
|                           child: Image.file(File(imagePath))), | ||||
|                           child: Image.file(File(widget.imagePath))), | ||||
|                       const Padding( | ||||
|                         padding: EdgeInsets.symmetric(vertical: 16.0), | ||||
|                         child: Text( | ||||
| @@ -103,7 +124,8 @@ class DisplayPictureScreen extends StatelessWidget { | ||||
|                         runSpacing: 8, | ||||
|                         children: List.generate(4, (index) { | ||||
|                           List filteredList = listIcons | ||||
|                               .where((element) => element['key'] == content) | ||||
|                               .where( | ||||
|                                   (element) => element['key'] == widget.content) | ||||
|                               .toList(); | ||||
|                           final urlImg = filteredList[index]['urlImg']; | ||||
|                           final tag = filteredList[index]['tag']; | ||||
| @@ -162,10 +184,10 @@ class DisplayPictureScreen extends StatelessWidget { | ||||
|                                 provider.initCamera().then((cameras) { | ||||
|                                   routePush(context, | ||||
|                                       page: TakePictureScreen( | ||||
|                                         camera: content == 'ktp' | ||||
|                                         camera: widget.content == 'ktp' | ||||
|                                             ? cameras[0] | ||||
|                                             : cameras[1], | ||||
|                                         takeContent: content, | ||||
|                                         takeContent: widget.content, | ||||
|                                       )); | ||||
|                                 }); | ||||
|                               }, | ||||
|   | ||||
| @@ -139,9 +139,9 @@ class TextFormView extends StatelessWidget { | ||||
|             onTap: onTap, | ||||
|             onEditingComplete: onSubmit, | ||||
|             style: TextStyle( | ||||
|               fontWeight: FontWeight.bold, | ||||
|               fontWeight: FontWeight.w500, | ||||
|               fontSize: 14, | ||||
|               color: fontColorDisabled ?? Colors.black, | ||||
|               color: fontColorDisabled ?? ColorPalette.slate500, | ||||
|             ), | ||||
|             readOnly: readOnly, | ||||
|             validator: validator, | ||||
|   | ||||
| @@ -1,10 +1,12 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.dart'; | ||||
| import 'package:cims_apps/application/component/button/button_view.dart'; | ||||
| import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.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/submission_data/submission_parent.dart'; | ||||
| import 'package:cims_apps/features/dashboard/dashboard_public/view/dashboard_public_view.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
|  | ||||
| class InitialRegistrationStep extends StatelessWidget { | ||||
| @@ -92,12 +94,12 @@ class InitialRegistrationStep extends StatelessWidget { | ||||
|       { | ||||
|         'desc': 'Personal Data', | ||||
|         'isActive': true, | ||||
|         'isDone': true, | ||||
|         'isDone': false, | ||||
|         'isLast': false, | ||||
|       }, | ||||
|       { | ||||
|         'desc': 'Email', | ||||
|         'isActive': true, | ||||
|         'isActive': false, | ||||
|         'isDone': false, | ||||
|         'isLast': false, | ||||
|       }, | ||||
| @@ -146,9 +148,8 @@ class InitialRegistrationStep extends StatelessWidget { | ||||
|     ]; | ||||
|  | ||||
|     return Scaffold( | ||||
|       appBar: AppBar( | ||||
|         title: const Text('Registration'), | ||||
|       ), | ||||
|       appBar: | ||||
|           CustomAppBar(height: SizeConfig.height * .1, title: 'Registration'), | ||||
|       body: Container( | ||||
|         padding: const EdgeInsets.symmetric(horizontal: 24.0), | ||||
|         child: Column( | ||||
| @@ -175,7 +176,7 @@ class InitialRegistrationStep extends StatelessWidget { | ||||
|               ], | ||||
|             ), | ||||
|             SizedBox( | ||||
|               height: SizeConfig.height * .6, | ||||
|               height: SizeConfig.height * .55, | ||||
|               child: SingleChildScrollView( | ||||
|                 scrollDirection: Axis.vertical, | ||||
|                 child: Column( | ||||
| @@ -192,12 +193,29 @@ class InitialRegistrationStep extends StatelessWidget { | ||||
|                 ), | ||||
|               ), | ||||
|             ), | ||||
|             ButtonView( | ||||
|               name: 'Let’s Start', | ||||
|               marginVertical: 8.0, | ||||
|               onPressed: () { | ||||
|                 routePush(context, page: const SubmissionParent()); | ||||
|               }, | ||||
|             Row( | ||||
|               mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|               children: [ | ||||
|                 ButtonView( | ||||
|                   name: 'Home Page', | ||||
|                   marginVertical: 8.0, | ||||
|                   width: SizeConfig.width * .42, | ||||
|                   isOutlined: true, | ||||
|                   onPressed: () { | ||||
|                     routePush(context, | ||||
|                         page: const DashboardPublicView(), | ||||
|                         routeType: RouteType.pushReplace); | ||||
|                   }, | ||||
|                 ), | ||||
|                 ButtonView( | ||||
|                   name: 'Let’s Start', | ||||
|                   marginVertical: 8.0, | ||||
|                   width: SizeConfig.width * .42, | ||||
|                   onPressed: () { | ||||
|                     routePush(context, page: const SubmissionParent()); | ||||
|                   }, | ||||
|                 ), | ||||
|               ], | ||||
|             ) | ||||
|           ], | ||||
|         ), | ||||
|   | ||||
| @@ -1,12 +1,13 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.dart'; | ||||
| import 'package:cims_apps/application/component/button/button_view.dart'; | ||||
| import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.dart'; | ||||
| import 'package:cims_apps/application/component/image/image_view.dart'; | ||||
| import 'package:cims_apps/application/component/text_caption/text_caption.dart'; | ||||
| import 'package:cims_apps/application/component/text_form/text_form_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/submission_data/submission_parent.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/initial_registration_step.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/registration_viewmodel.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
| @@ -20,9 +21,8 @@ class RegistrationPasswordView extends StatelessWidget { | ||||
|         create: (context) => RegistrationViewModel(), | ||||
|         builder: (context, child) { | ||||
|           return Scaffold( | ||||
|             appBar: AppBar( | ||||
|               title: const Text('Sign Up'), | ||||
|             ), | ||||
|             appBar: | ||||
|                 CustomAppBar(height: SizeConfig.height * .1, title: 'Sign Up'), | ||||
|             body: SingleChildScrollView( | ||||
|               padding: const EdgeInsets.all(16.0), | ||||
|               child: Consumer<RegistrationViewModel>( | ||||
| @@ -45,6 +45,8 @@ class RegistrationPasswordView extends StatelessWidget { | ||||
|                         validator: (value) { | ||||
|                           if (value!.isEmpty) { | ||||
|                             return 'Password must filled'; | ||||
|                           } else if (value.length <= 8) { | ||||
|                             return 'Minimum password 8 Character'; | ||||
|                           } else { | ||||
|                             return null; | ||||
|                           } | ||||
| @@ -139,7 +141,7 @@ class DialogSuccess extends StatelessWidget { | ||||
|               marginVertical: 8.0, | ||||
|               onPressed: () { | ||||
|                 routePush(context, | ||||
|                     page: const SubmissionParent(), | ||||
|                     page: const InitialRegistrationStep(), | ||||
|                     routeType: RouteType.pushReplace); | ||||
|               }, | ||||
|             ) | ||||
|   | ||||
| @@ -0,0 +1,44 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.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/component/text_caption/text_caption.dart'; | ||||
| import 'package:cims_apps/core/route/route.dart'; | ||||
| import 'package:cims_apps/features/bottom_navigation_view.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
|  | ||||
| class RegistrationSuccessView extends StatelessWidget { | ||||
|   const RegistrationSuccessView({Key? key}) : super(key: key); | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Scaffold( | ||||
|       body: Container( | ||||
|         padding: const EdgeInsets.all(24.0), | ||||
|         child: Column( | ||||
|           children: [ | ||||
|             const ImageView(image: PathAssets.imgFinish), | ||||
|             const TextCaption( | ||||
|               crossAxisAlignment: CrossAxisAlignment.center, | ||||
|               textAlignSubtitle: TextAlign.center, | ||||
|               title: 'Registration Successful!', | ||||
|               subtitle: | ||||
|                   'Please wait for the data verification process so that you can start investing.', | ||||
|             ), | ||||
|             const Spacer(), | ||||
|             ButtonView( | ||||
|               name: 'Next', | ||||
|               marginVertical: 0.0, | ||||
|               onPressed: () { | ||||
|                 routePush( | ||||
|                   context, | ||||
|                   page: const BottomNavigationView(), | ||||
|                   routeType: RouteType.pushReplace, | ||||
|                 ); | ||||
|               }, | ||||
|             ) | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @@ -1,5 +1,6 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.dart'; | ||||
| import 'package:cims_apps/application/component/button/button_view.dart'; | ||||
| import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.dart'; | ||||
| import 'package:cims_apps/application/component/image/image_view.dart'; | ||||
| import 'package:cims_apps/application/component/otp/otp_view.dart'; | ||||
| import 'package:cims_apps/application/component/text_caption/text_caption.dart'; | ||||
| @@ -24,6 +25,11 @@ class RegistrationView extends StatelessWidget { | ||||
|         context: context, | ||||
|         isScrollControlled: true, | ||||
|         enableDrag: false, | ||||
|         shape: const RoundedRectangleBorder( | ||||
|           borderRadius: BorderRadius.vertical( | ||||
|             top: Radius.zero, | ||||
|           ), | ||||
|         ), | ||||
|         builder: (BuildContext context) { | ||||
|           return Padding( | ||||
|             padding: EdgeInsets.only( | ||||
| @@ -46,10 +52,9 @@ class RegistrationView extends StatelessWidget { | ||||
|         create: (context) => RegistrationViewModel(), | ||||
|         builder: (context, child) { | ||||
|           return Scaffold( | ||||
|             appBar: AppBar( | ||||
|               title: const Text('Sign Up'), | ||||
|             ), | ||||
|             body: Container( | ||||
|             appBar: | ||||
|                 CustomAppBar(height: SizeConfig.height * .1, title: 'Sign Up'), | ||||
|             body: SingleChildScrollView( | ||||
|               padding: const EdgeInsets.all(24.0), | ||||
|               child: Consumer<RegistrationViewModel>( | ||||
|                   builder: (context, provider, child) { | ||||
| @@ -68,6 +73,7 @@ class RegistrationView extends StatelessWidget { | ||||
|                         inputFormatters: [ | ||||
|                           FilteringTextInputFormatter.deny(RegExp(r'^0')) | ||||
|                         ], | ||||
|                         contentPadding: EdgeInsets.zero, | ||||
|                         prefixIcon: Container( | ||||
|                             width: SizeConfig.width * .23, | ||||
|                             padding: | ||||
|   | ||||
| @@ -0,0 +1,112 @@ | ||||
| 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/list_tile/list_tile_view.dart'; | ||||
| import 'package:cims_apps/application/component/text_caption/text_caption.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/submission_data/submission_parent.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
|  | ||||
| class ConfirmBankAccount extends StatelessWidget { | ||||
|   const ConfirmBankAccount({Key? key}) : super(key: key); | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     List listData = [ | ||||
|       {'title': 'Bank Name', 'subtitle': 'Bank Mandiri'}, | ||||
|       {'title': 'Account Number', 'subtitle': '123002212084'}, | ||||
|       {'title': 'Account Owner Name', 'subtitle': 'Muhamad Rosyidin'}, | ||||
|       {'title': 'Name on ID card', 'subtitle': 'Muhamad Rosyidin'}, | ||||
|     ]; | ||||
|     return Scaffold( | ||||
|       appBar: AppBar( | ||||
|         toolbarHeight: 70, | ||||
|         backgroundColor: Colors.white, | ||||
|         surfaceTintColor: Colors.white, | ||||
|         automaticallyImplyLeading: false, | ||||
|         title: Row( | ||||
|           mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|           children: [ | ||||
|             const BackButtonView(), | ||||
|             const Text('Registration'), | ||||
|             SizedBox( | ||||
|               width: SizeConfig.width * 0.1, | ||||
|             ) | ||||
|           ], | ||||
|         ), | ||||
|         shape: const RoundedRectangleBorder( | ||||
|             side: BorderSide(color: ColorPalette.slate200)), | ||||
|       ), | ||||
|       body: SingleChildScrollView( | ||||
|         padding: const EdgeInsets.all(16.0), | ||||
|         child: SizedBox( | ||||
|           height: SizeConfig.height * .85, | ||||
|           child: Column( | ||||
|             mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|             crossAxisAlignment: CrossAxisAlignment.start, | ||||
|             children: [ | ||||
|               const TextCaption(title: 'Bank account confirmation'), | ||||
|               SizedBox( | ||||
|                 height: SizeConfig.height * .6, | ||||
|                 child: Column( | ||||
|                   mainAxisAlignment: MainAxisAlignment.start, | ||||
|                   crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                   children: [ | ||||
|                     ...listData.map((e) { | ||||
|                       return Padding( | ||||
|                         padding: const EdgeInsets.only(bottom: 16.0), | ||||
|                         child: Column( | ||||
|                           mainAxisAlignment: MainAxisAlignment.start, | ||||
|                           crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                           children: [ | ||||
|                             Text( | ||||
|                               e['title'], | ||||
|                               style: const TextStyle( | ||||
|                                   color: ColorPalette.slate400, fontSize: 16), | ||||
|                             ), | ||||
|                             Text( | ||||
|                               e['subtitle'], | ||||
|                               style: const TextStyle( | ||||
|                                   fontSize: 16, | ||||
|                                   color: ColorPalette.slate800, | ||||
|                                   fontWeight: FontWeight.w600), | ||||
|                             ), | ||||
|                           ], | ||||
|                         ), | ||||
|                       ); | ||||
|                     }).toList(), | ||||
|                     const ListTileView( | ||||
|                       title: | ||||
|                           'Make sure your data is correct as it will affect the disbursement process', | ||||
|                     ), | ||||
|                   ], | ||||
|                 ), | ||||
|               ), | ||||
|               Row( | ||||
|                 mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                 children: [ | ||||
|                   ButtonView( | ||||
|                     name: 'Recheck', | ||||
|                     isOutlined: true, | ||||
|                     width: SizeConfig.width * .42, | ||||
|                     onPressed: () { | ||||
|                       Navigator.pop(context); | ||||
|                     }, | ||||
|                   ), | ||||
|                   ButtonView( | ||||
|                     name: 'Confirm', | ||||
|                     width: SizeConfig.width * .42, | ||||
|                     onPressed: () { | ||||
|                       routePush(context, page: const SubmissionParent()); | ||||
|                     }, | ||||
|                   ), | ||||
|                 ], | ||||
|               ) | ||||
|             ], | ||||
|           ), | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @@ -1,56 +1,83 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.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/component/select_form/select_form_view.dart'; | ||||
| import 'package:cims_apps/application/component/text_caption/text_caption.dart'; | ||||
| import 'package:cims_apps/application/component/text_form/text_form_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/submission_data/data_bank/guide_screen.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
|  | ||||
| import 'confirm_bank_account.dart'; | ||||
|  | ||||
| class SubmitBankAccount extends StatelessWidget { | ||||
|   const SubmitBankAccount({Key? key}) : super(key: key); | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     List<ItemSelectForm> listForm = [ | ||||
|       ItemSelectForm('key1', 'BCA'), | ||||
|       ItemSelectForm('key2', 'BRI'), | ||||
|       ItemSelectForm('key3', 'BNI'), | ||||
|       ItemSelectForm('key4', 'BANK MANDIRI'), | ||||
|       ItemSelectForm('key5', 'CIMB NIAGA'), | ||||
|     ]; | ||||
|     return SingleChildScrollView( | ||||
|       child: Column( | ||||
|         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|         children: [ | ||||
|           const TextCaption(title: 'Input your bank account data'), | ||||
|           SelectFormView( | ||||
|             name: 'Bank Name', | ||||
|             listItem: listForm, | ||||
|             onSelect: (value) {}, | ||||
|           ), | ||||
|           TextFormView( | ||||
|             name: 'Account Number', | ||||
|             trailingTitleWidget: SizedBox( | ||||
|               width: 24, | ||||
|               child: GestureDetector( | ||||
|                 onTap: () { | ||||
|                   routePush(context, page: GuideScreen()); | ||||
|                 }, | ||||
|                 child: const ImageView(image: PathAssets.iconQuestion), | ||||
|               ), | ||||
|             ), | ||||
|           ), | ||||
|           TextFormView(name: 'Account Owner Name'), | ||||
|           const Text( | ||||
|             "Make sure the account you use is in your name, not someone else's", | ||||
|             style: TextStyle( | ||||
|               color: ColorPalette.slate400, | ||||
|             ), | ||||
|     return MultiProvider( | ||||
|         providers: [ | ||||
|           ChangeNotifierProvider( | ||||
|             create: (context) => SubmissionDataViewModel(), | ||||
|           ) | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|         builder: (context, child) { | ||||
|           return SizedBox( | ||||
|             child: Consumer<SubmissionDataViewModel>( | ||||
|                 builder: (context, provider, child) { | ||||
|               return Column( | ||||
|                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                 children: [ | ||||
|                   const TextCaption(title: 'Input your bank account data'), | ||||
|                   SelectFormView( | ||||
|                     name: 'Bank Name', | ||||
|                     hintText: 'Select Bank', | ||||
|                     listItem: provider.listBank, | ||||
|                     ctrl: provider.ctrlBankName, | ||||
|                     onSelect: (value) {}, | ||||
|                   ), | ||||
|                   TextFormView( | ||||
|                     name: 'Account Number', | ||||
|                     hintText: 'Input Account Number', | ||||
|                     trailingTitleWidget: SizedBox( | ||||
|                       width: 24, | ||||
|                       child: GestureDetector( | ||||
|                         onTap: () { | ||||
|                           routePush(context, page: const GuideScreen()); | ||||
|                         }, | ||||
|                         child: const ImageView(image: PathAssets.iconQuestion), | ||||
|                       ), | ||||
|                     ), | ||||
|                   ), | ||||
|                   TextFormView( | ||||
|                     name: 'Account Owner Name', | ||||
|                     hintText: 'Input Account Name', | ||||
|                   ), | ||||
|                   const Text( | ||||
|                     "Make sure the account you use is in your name, not someone else's", | ||||
|                     style: TextStyle( | ||||
|                       color: ColorPalette.slate400, | ||||
|                     ), | ||||
|                   ), | ||||
|                   SizedBox(height: SizeConfig.height * .08), | ||||
|                   ButtonView( | ||||
|                     name: 'Next', | ||||
|                     onPressed: () { | ||||
|                       provider.next(context).then((value) { | ||||
|                         if (value) { | ||||
|                           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:cims_apps/features/auth/registration/view/submission_data/terms_and_condition/terms_and_condition_view.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) { | ||||
| @@ -26,19 +24,16 @@ class ResultsView extends StatelessWidget { | ||||
|         title: Row( | ||||
|           mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|           children: [ | ||||
|             BackButtonView(), | ||||
|             const 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), | ||||
|         padding: const EdgeInsets.all(24), | ||||
|         child: Column( | ||||
|           crossAxisAlignment: CrossAxisAlignment.start, | ||||
|           children: [ | ||||
| @@ -46,39 +41,41 @@ 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: [ | ||||
|                     Container( | ||||
|                       padding: EdgeInsets.all(24), | ||||
|                       padding: const EdgeInsets.all(24), | ||||
|                       child: Column( | ||||
|                         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                         children: [ | ||||
|                           Text( | ||||
|                             typeResult.type, | ||||
|                             style: TextStyle( | ||||
|                               fontWeight: FontWeight.bold, | ||||
|                               fontSize: 24, | ||||
|                               color: ColorPalette.white | ||||
|                             ), | ||||
|                             style: const TextStyle( | ||||
|                                 fontWeight: FontWeight.bold, | ||||
|                                 fontSize: 24, | ||||
|                                 color: ColorPalette.white), | ||||
|                           ), | ||||
|                           SizedBox(height: 16,), | ||||
|                           Text('Total Score :', | ||||
|                           const SizedBox( | ||||
|                             height: 16, | ||||
|                           ), | ||||
|                           const Text( | ||||
|                             'Total Score :', | ||||
|                             style: TextStyle( | ||||
|                                 fontWeight: FontWeight.bold, | ||||
|                                 fontSize: 16, | ||||
|                                 color: ColorPalette.white | ||||
|                             ), | ||||
|                                 color: ColorPalette.white), | ||||
|                           ), | ||||
|                           Text(totalScore, | ||||
|                             style: TextStyle( | ||||
|                           Text( | ||||
|                             totalScore, | ||||
|                             style: const TextStyle( | ||||
|                                 fontWeight: FontWeight.bold, | ||||
|                                 fontSize: 28, | ||||
|                                 color: ColorPalette.white | ||||
|                             ), | ||||
|                                 color: ColorPalette.white), | ||||
|                           ) | ||||
|                         ], | ||||
|                       ), | ||||
| @@ -87,35 +84,30 @@ class ResultsView extends StatelessWidget { | ||||
|                 ), | ||||
|               ), | ||||
|             ), | ||||
|             SizedBox( | ||||
|             const SizedBox( | ||||
|               height: 24, | ||||
|             ), | ||||
|             Text( | ||||
|               typeResult.desc, | ||||
|               style: TextStyle( | ||||
|                 color: ColorPalette.slate500, | ||||
|                 fontSize: 16 | ||||
|               ) | ||||
|             ), | ||||
|             SizedBox( | ||||
|             Text(typeResult.desc, | ||||
|                 style: const TextStyle( | ||||
|                     color: ColorPalette.slate500, fontSize: 16)), | ||||
|             const SizedBox( | ||||
|               height: 24, | ||||
|             ), | ||||
|             Text( | ||||
|             const Text( | ||||
|               'Suitable Product', | ||||
|               style: TextStyle( | ||||
|                 color: ColorPalette.slate800, | ||||
|                 fontWeight: FontWeight.bold, | ||||
|                 fontSize: 16 | ||||
|               ), | ||||
|                   color: ColorPalette.slate800, | ||||
|                   fontWeight: FontWeight.bold, | ||||
|                   fontSize: 16), | ||||
|             ), | ||||
|             SizedBox( | ||||
|             const SizedBox( | ||||
|               height: 16, | ||||
|             ), | ||||
|             Wrap( | ||||
|               runSpacing: 16, | ||||
|               children: typeResult.suitableProduct.map((e) { | ||||
|                 return Container( | ||||
|                   padding: EdgeInsets.all(16), | ||||
|                   padding: const EdgeInsets.all(16), | ||||
|                   decoration: BoxDecoration( | ||||
|                     borderRadius: BorderRadius.circular(6), | ||||
|                     border: Border.all(color: ColorPalette.slate200), | ||||
| @@ -123,24 +115,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) | ||||
|                       ), | ||||
|                       SizedBox( | ||||
|                           padding: const 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)), | ||||
|                       const SizedBox( | ||||
|                         width: 12, | ||||
|                       ), | ||||
|                       Expanded( | ||||
|                         child: Text(e['desc'], | ||||
|                           style: TextStyle( | ||||
|                             fontSize: 16, | ||||
|                             fontWeight: FontWeight.bold, | ||||
|                             color: ColorPalette.slate800 | ||||
|                           ), | ||||
|                         child: Text( | ||||
|                           e['desc'], | ||||
|                           style: const TextStyle( | ||||
|                               fontSize: 16, | ||||
|                               fontWeight: FontWeight.bold, | ||||
|                               color: ColorPalette.slate800), | ||||
|                         ), | ||||
|                       ) | ||||
|                     ], | ||||
| @@ -148,13 +140,12 @@ class ResultsView extends StatelessWidget { | ||||
|                 ); | ||||
|               }).toList(), | ||||
|             ), | ||||
|             SizedBox( | ||||
|             const SizedBox( | ||||
|               height: 32, | ||||
|             ), | ||||
|             ButtonView( | ||||
|               name: 'Re-test', | ||||
|               onPressed: () { | ||||
|               }, | ||||
|               onPressed: () {}, | ||||
|               marginVertical: 0, | ||||
|               backgroundColor: ColorPalette.white, | ||||
|               textColor: ColorPalette.primary, | ||||
| @@ -162,21 +153,25 @@ class ResultsView extends StatelessWidget { | ||||
|               isOutlined: true, | ||||
|               textSize: 16, | ||||
|               heightWrapContent: true, | ||||
|               contentPadding: EdgeInsets.all(16), | ||||
|               contentPadding: const EdgeInsets.all(16), | ||||
|               width: SizeConfig.width, | ||||
|             ), | ||||
|             SizedBox( | ||||
|             const SizedBox( | ||||
|               height: 16, | ||||
|             ), | ||||
|             ButtonView( | ||||
|               name: 'Confirm', | ||||
|               onPressed: () { | ||||
|                 routePush(context, page: DialogSuccess()); | ||||
|                 routePush( | ||||
|                   context, | ||||
|                   page: const TermsAndConditionView(), | ||||
|                   routeType: RouteType.pushReplace, | ||||
|                 ); | ||||
|               }, | ||||
|               marginVertical: 0, | ||||
|               textSize: 16, | ||||
|               heightWrapContent: true, | ||||
|               contentPadding: EdgeInsets.all(16), | ||||
|               contentPadding: const EdgeInsets.all(16), | ||||
|               width: SizeConfig.width, | ||||
|             ) | ||||
|           ], | ||||
|   | ||||
| @@ -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: [ | ||||
|             const 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: const EdgeInsets.all(24), | ||||
|         child: Column( | ||||
|           mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|           children: [ | ||||
|             const 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: [ | ||||
|                 const 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), | ||||
|                     ) | ||||
|                   ], | ||||
|                 ), | ||||
|                 const SizedBox( | ||||
|                   height: 24, | ||||
|                 ), | ||||
|                 ButtonView( | ||||
|                   name: "Let's Start", | ||||
|                   onPressed: () { | ||||
|                     routePush(context, page: const 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, | ||||
|               ) | ||||
|             ], | ||||
|           ) | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
|   | ||||
| @@ -1,13 +1,15 @@ | ||||
| import 'package:cims_apps/application/component/button/button_view.dart'; | ||||
| import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.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/submission_data/data_bank/submit_bank_account.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/submission_data/risk_profile/risk_profile_view.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/submission_data/submit_data_id_card.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/submission_data/submit_photo_ktp.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/submission_data/submit_email.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/submission_data/submit_personal_data.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/submission_data/submit_photo_selfie.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/submission_data/submit_signature/initial_signature.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart'; | ||||
| import 'package:cims_apps/features/bottom_navigation_view.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| @@ -24,7 +26,7 @@ class SubmissionParent extends StatefulWidget { | ||||
| class _SubmissionParentState extends State<SubmissionParent> { | ||||
|   Widget _stepItem({bool isCurrentStep = false, bool isDone = false}) { | ||||
|     return Container( | ||||
|       margin: const EdgeInsets.only(right: 4.0, left: 4.0), | ||||
|       margin: const EdgeInsets.only(right: 0.0, left: 4.0), | ||||
|       height: 6, | ||||
|       width: SizeConfig.width * .08, | ||||
|       decoration: BoxDecoration( | ||||
| @@ -51,17 +53,11 @@ class _SubmissionParentState extends State<SubmissionParent> { | ||||
|       case 6: | ||||
|         return const SubmitBankAccount(); | ||||
|       case 7: | ||||
|         return Container( | ||||
|           child: Text("Step 7"), | ||||
|         ); | ||||
|         return const InitialSignature(); | ||||
|       case 8: | ||||
|         return Container( | ||||
|           child: Text("Step 8"), | ||||
|         ); | ||||
|         return const RiskProfileView(); | ||||
|       case 9: | ||||
|         return Container( | ||||
|           child: Text("Step 9"), | ||||
|         ); | ||||
|         return const Text("Step 9"); | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -77,15 +73,14 @@ class _SubmissionParentState extends State<SubmissionParent> { | ||||
|                   routeType: RouteType.pushReplace); | ||||
|               return false; | ||||
|             }, | ||||
|             child: Scaffold( | ||||
|               appBar: AppBar( | ||||
|                 title: const Text('Registration'), | ||||
|               ), | ||||
|               body: Stack( | ||||
|                 children: [ | ||||
|                   Consumer<SubmissionDataViewModel>( | ||||
|                       builder: (context, provider, child) { | ||||
|                     return Column( | ||||
|             child: Consumer<SubmissionDataViewModel>( | ||||
|                 builder: (context, provider, child) { | ||||
|               return Scaffold( | ||||
|                 appBar: CustomAppBar( | ||||
|                     height: SizeConfig.height * .1, title: 'Registration'), | ||||
|                 body: Stack( | ||||
|                   children: [ | ||||
|                     Column( | ||||
|                       crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                       mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                       children: [ | ||||
| @@ -94,13 +89,19 @@ class _SubmissionParentState extends State<SubmissionParent> { | ||||
|                               horizontal: 16.0, vertical: 16.0), | ||||
|                           child: Row( | ||||
|                             mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                             children: List.generate( | ||||
|                               provider.stepAmount, | ||||
|                               (index) => _stepItem( | ||||
|                                 isCurrentStep: | ||||
|                                     provider.getCurrentStep == index + 1, | ||||
|                               ), | ||||
|                             ), | ||||
|                             children: | ||||
|                                 List.generate(provider.stepAmount, (index) { | ||||
|                               // print('indd $index'); | ||||
|                               // print( | ||||
|                               //     'getCurrentStep ${provider.getCurrentStep}'); | ||||
|                               return _stepItem( | ||||
|                                 isCurrentStep: provider.getCurrentStep == | ||||
|                                         index + 1 || | ||||
|                                     provider.getCurrentStep - 1 == index + 1, | ||||
|                                 // isDone: | ||||
|                                 //     index + 1 != provider.getCurrentStep + 1, | ||||
|                               ); | ||||
|                             }), | ||||
|                           ), | ||||
|                         ), | ||||
|                         Expanded( | ||||
| @@ -110,25 +111,12 @@ class _SubmissionParentState extends State<SubmissionParent> { | ||||
|                             child: _content(provider.getCurrentStep), | ||||
|                           ), | ||||
|                         ), | ||||
|                         provider.getCurrentStep == 3 || | ||||
|                                 provider.getCurrentStep == 4 | ||||
|                             ? const SizedBox() | ||||
|                             : Align( | ||||
|                                 alignment: Alignment.bottomCenter, | ||||
|                                 child: ButtonView( | ||||
|                                   name: 'Next', | ||||
|                                   marginVertical: 16.0, | ||||
|                                   onPressed: () { | ||||
|                                     provider.nextSubmission(context); | ||||
|                                   }, | ||||
|                                 ), | ||||
|                               ) | ||||
|                       ], | ||||
|                     ); | ||||
|                   }), | ||||
|                 ], | ||||
|               ), | ||||
|             ), | ||||
|                     ), | ||||
|                   ], | ||||
|                 ), | ||||
|               ); | ||||
|             }), | ||||
|           ); | ||||
|         }); | ||||
|   } | ||||
|   | ||||
| @@ -1,22 +1,23 @@ | ||||
| import 'dart:io'; | ||||
|  | ||||
| import 'package:cims_apps/application/assets/path_assets.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/component/text_caption/text_caption.dart'; | ||||
| import 'package:cims_apps/application/component/text_form/text_form_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/submission_data/submission_parent.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
|  | ||||
| class SubmitDataIdCard extends StatelessWidget { | ||||
|   const SubmitDataIdCard({Key? key}) : super(key: key); | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     List listImg = [ | ||||
|       {'urlImg': PathAssets.imgKtpClear, 'tag': 'ID Card'}, | ||||
|       {'urlImg': PathAssets.imgSelfieClear, 'tag': 'Selfie with ID Card'}, | ||||
|     ]; | ||||
|  | ||||
|     bottomSheet() { | ||||
|       showModalBottomSheet( | ||||
|         context: context, | ||||
| @@ -83,7 +84,7 @@ class SubmitDataIdCard extends StatelessWidget { | ||||
|       ); | ||||
|     } | ||||
|  | ||||
|     Widget photoDocument() { | ||||
|     Widget photoDocument(SubmissionDataViewModel provider) { | ||||
|       return Column( | ||||
|         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|         children: [ | ||||
| @@ -100,16 +101,21 @@ class SubmitDataIdCard extends StatelessWidget { | ||||
|           ), | ||||
|           Row( | ||||
|             mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|             children: listImg.map((e) { | ||||
|             children: provider.listImg.map((e) { | ||||
|               return Column( | ||||
|                 children: [ | ||||
|                   SizedBox( | ||||
|                     height: SizeConfig.height * .18, | ||||
|                     width: SizeConfig.width * .45, | ||||
|                     child: ImageView( | ||||
|                       image: e['urlImg'], | ||||
|                       fit: BoxFit.fill, | ||||
|                       borderRadius: 12, | ||||
|                     child: ClipRRect( | ||||
|                       borderRadius: BorderRadius.circular(8), | ||||
|                       child: Image.file( | ||||
|                         File(e.image), | ||||
|                         fit: BoxFit.fill, | ||||
|                         errorBuilder: (context, error, stackTrace) { | ||||
|                           return const Icon(Icons.image_not_supported_outlined); | ||||
|                         }, | ||||
|                       ), | ||||
|                     ), | ||||
|                   ), | ||||
|                   SizedBox( | ||||
| @@ -118,7 +124,7 @@ class SubmitDataIdCard extends StatelessWidget { | ||||
|                       mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                       children: [ | ||||
|                         Text( | ||||
|                           e['tag'], | ||||
|                           e.text, | ||||
|                           overflow: TextOverflow.ellipsis, | ||||
|                           maxLines: 1, | ||||
|                           style: const TextStyle( | ||||
| @@ -151,68 +157,90 @@ class SubmitDataIdCard extends StatelessWidget { | ||||
|       ); | ||||
|     } | ||||
|  | ||||
|     return SingleChildScrollView( | ||||
|       child: Column( | ||||
|         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|         children: [ | ||||
|           const TextCaption(title: 'Check your ID card data for accuracy'), | ||||
|           TextFormView(name: 'NIK'), | ||||
|           TextFormView(name: 'Full Name'), | ||||
|           TextFormView( | ||||
|             name: 'Birth Date', | ||||
|             suffixIcon: const Icon( | ||||
|               Icons.calendar_today_rounded, | ||||
|               color: ColorPalette.slate400, | ||||
|             ), | ||||
|           ), | ||||
|           photoDocument(), | ||||
|           Container( | ||||
|             width: SizeConfig.width, | ||||
|             padding: const EdgeInsets.symmetric(horizontal: 16.0), | ||||
|             margin: const EdgeInsets.symmetric(vertical: 16.0), | ||||
|             decoration: BoxDecoration( | ||||
|               color: ColorPalette.blue50, | ||||
|               borderRadius: BorderRadius.circular(10), | ||||
|               border: Border.all( | ||||
|                 color: ColorPalette.greyLights, | ||||
|                 width: 1, | ||||
|               ), | ||||
|             ), | ||||
|             child: Row( | ||||
|               mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|               children: [ | ||||
|                 const ImageView( | ||||
|                   image: PathAssets.iconShield, | ||||
|                   width: 20, | ||||
|                   height: 22, | ||||
|                 ), | ||||
|                 const SizedBox( | ||||
|                   width: 8, | ||||
|                 ), | ||||
|                 const Expanded( | ||||
|                   child: Text( | ||||
|                     'Will my data be safe?', | ||||
|                     style: TextStyle( | ||||
|                       fontWeight: FontWeight.w600, | ||||
|                       color: ColorPalette.primary, | ||||
|                     ), | ||||
|                   ), | ||||
|                 ), | ||||
|                 IconButton( | ||||
|                   onPressed: () { | ||||
|                     bottomSheet(); | ||||
|                   }, | ||||
|                   icon: const Icon( | ||||
|                     Icons.arrow_forward_ios, | ||||
|                     color: ColorPalette.primary, | ||||
|                     size: 20, | ||||
|                   ), | ||||
|                 ) | ||||
|               ], | ||||
|             ), | ||||
|     return MultiProvider( | ||||
|         providers: [ | ||||
|           ChangeNotifierProvider( | ||||
|             create: (context) => SubmissionDataViewModel(), | ||||
|           ) | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|         builder: (context, child) { | ||||
|           return SingleChildScrollView( | ||||
|             child: Consumer<SubmissionDataViewModel>( | ||||
|                 builder: (context, provider, child) { | ||||
|               return Column( | ||||
|                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                 children: [ | ||||
|                   const TextCaption( | ||||
|                       title: 'Check your ID card data for accuracy'), | ||||
|                   TextFormView(name: 'NIK'), | ||||
|                   TextFormView(name: 'Full Name'), | ||||
|                   TextFormView( | ||||
|                     name: 'Birth Date', | ||||
|                     suffixIcon: const Icon( | ||||
|                       Icons.calendar_today_rounded, | ||||
|                       color: ColorPalette.slate400, | ||||
|                     ), | ||||
|                   ), | ||||
|                   photoDocument(provider), | ||||
|                   Container( | ||||
|                     width: SizeConfig.width, | ||||
|                     padding: const EdgeInsets.symmetric(horizontal: 16.0), | ||||
|                     margin: const EdgeInsets.symmetric(vertical: 16.0), | ||||
|                     decoration: BoxDecoration( | ||||
|                       color: ColorPalette.blue50, | ||||
|                       borderRadius: BorderRadius.circular(10), | ||||
|                       border: Border.all( | ||||
|                         color: ColorPalette.greyLights, | ||||
|                         width: 1, | ||||
|                       ), | ||||
|                     ), | ||||
|                     child: Row( | ||||
|                       mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                       children: [ | ||||
|                         const ImageView( | ||||
|                           image: PathAssets.iconShield, | ||||
|                           width: 20, | ||||
|                           height: 22, | ||||
|                         ), | ||||
|                         const SizedBox( | ||||
|                           width: 8, | ||||
|                         ), | ||||
|                         const Expanded( | ||||
|                           child: Text( | ||||
|                             'Will my data be safe?', | ||||
|                             style: TextStyle( | ||||
|                               fontWeight: FontWeight.w600, | ||||
|                               color: ColorPalette.primary, | ||||
|                             ), | ||||
|                           ), | ||||
|                         ), | ||||
|                         IconButton( | ||||
|                           onPressed: () { | ||||
|                             bottomSheet(); | ||||
|                           }, | ||||
|                           icon: const Icon( | ||||
|                             Icons.arrow_forward_ios, | ||||
|                             color: ColorPalette.primary, | ||||
|                             size: 20, | ||||
|                           ), | ||||
|                         ) | ||||
|                       ], | ||||
|                     ), | ||||
|                   ), | ||||
|                   ButtonView( | ||||
|                     name: 'Next', | ||||
|                     onPressed: () async { | ||||
|                       await provider.next(context).then((value) { | ||||
|                         if (value) { | ||||
|                           routePush(context, page: const SubmissionParent()); | ||||
|                         } | ||||
|                       }); | ||||
|                     }, | ||||
|                   ) | ||||
|                 ], | ||||
|               ); | ||||
|             }), | ||||
|           ); | ||||
|         }); | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -1,7 +1,11 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.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/component/text_caption/text_caption.dart'; | ||||
| import 'package:cims_apps/application/component/text_form/text_form_view.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/submission_data/submission_parent.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart'; | ||||
| import 'package:flutter/gestures.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| @@ -58,22 +62,36 @@ class SubmitEmail extends StatelessWidget { | ||||
|         builder: (context, child) { | ||||
|           return Consumer<SubmissionDataViewModel>( | ||||
|               builder: (context, provider, child) { | ||||
|             return Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               children: [ | ||||
|                 !provider.isEmailVerify | ||||
|                     ? const TextCaption(title: 'Enter your e-mail') | ||||
|                     : const TextCaption(title: 'Check your e-mail '), | ||||
|                 !provider.isEmailVerify | ||||
|                     ? TextFormView( | ||||
|                         name: 'E-mail Address', | ||||
|                         hintText: 'Input e-mail address', | ||||
|                         onTap: () { | ||||
|                           provider.submitEmail(); | ||||
|                         }, | ||||
|                       ) | ||||
|                     : _emailVerify(), | ||||
|               ], | ||||
|             return SingleChildScrollView( | ||||
|               child: Column( | ||||
|                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                 // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                 children: [ | ||||
|                   !provider.isEmailVerify | ||||
|                       ? const TextCaption(title: 'Enter your e-mail') | ||||
|                       : const TextCaption(title: 'Check your e-mail '), | ||||
|                   !provider.isEmailVerify | ||||
|                       ? TextFormView( | ||||
|                           name: 'E-mail Address', | ||||
|                           hintText: 'Input e-mail address', | ||||
|                           // onTap: () { | ||||
|                           //   provider.submitEmail(); | ||||
|                           // }, | ||||
|                         ) | ||||
|                       : _emailVerify(), | ||||
|                   SizedBox(height: SizeConfig.height * .42), | ||||
|                   ButtonView( | ||||
|                     name: 'Next', | ||||
|                     onPressed: () async { | ||||
|                       await provider.next(context).then((value) { | ||||
|                         if (value) { | ||||
|                           routePush(context, page: const SubmissionParent()); | ||||
|                         } | ||||
|                       }); | ||||
|                     }, | ||||
|                   ) | ||||
|                 ], | ||||
|               ), | ||||
|             ); | ||||
|           }); | ||||
|         }); | ||||
|   | ||||
| @@ -1,6 +1,8 @@ | ||||
| import 'package:cims_apps/application/component/button/button_view.dart'; | ||||
| import 'package:cims_apps/application/component/select_form/select_form_view.dart'; | ||||
| import 'package:cims_apps/application/component/text_caption/text_caption.dart'; | ||||
| import 'package:cims_apps/application/theme/color_palette.dart'; | ||||
| import 'package:cims_apps/core/route/route.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/submission_data/submission_parent.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
| @@ -10,44 +12,63 @@ class SubmitPersonalData extends StatelessWidget { | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     List<ItemSelectForm> listForm = [ | ||||
|       ItemSelectForm('key1', 'text'), | ||||
|       ItemSelectForm('key2', 'text'), | ||||
|       ItemSelectForm('key3', 'text'), | ||||
|       ItemSelectForm('key4', 'text'), | ||||
|       ItemSelectForm('key5', 'text'), | ||||
|     ]; | ||||
|     return ChangeNotifierProvider( | ||||
|         create: (context) => SubmissionDataViewModel(), | ||||
|         builder: (context, child) { | ||||
|           return Consumer<SubmissionDataViewModel>( | ||||
|               builder: (context, provider, child) { | ||||
|             return SingleChildScrollView( | ||||
|               child: Column( | ||||
|                 crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                 // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                 children: [ | ||||
|                   const TextCaption(title: 'Your personal details'), | ||||
|                   SelectFormView( | ||||
|                     name: 'Occupation', | ||||
|                     hintText: 'Select occupation ', | ||||
|                     bottomSheetTitle: Row( | ||||
|                       mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                       children: [ | ||||
|                         const Text('Occupation'), | ||||
|                         IconButton( | ||||
|                             onPressed: () => Navigator.pop(context), | ||||
|                             icon: const Icon( | ||||
|                               Icons.clear, | ||||
|                               size: 20, | ||||
|                               color: ColorPalette.greyBase, | ||||
|                             )), | ||||
|                       ], | ||||
|               child: Form( | ||||
|                 key: provider.formKeyPersonalData, | ||||
|                 child: Column( | ||||
|                   crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                   mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                   children: [ | ||||
|                     const TextCaption(title: 'Your personal details'), | ||||
|                     SelectFormView( | ||||
|                       name: 'Occupation', | ||||
|                       hintText: 'Select occupation ', | ||||
|                       ctrl: provider.ctrlOccupation, | ||||
|                       listItem: provider.listOccupation, | ||||
|                       onSelect: (value) {}, | ||||
|                     ), | ||||
|                     listItem: listForm, | ||||
|                     onSelect: (value) {}, | ||||
|                   ), | ||||
|                 ], | ||||
|                     SelectFormView( | ||||
|                       name: 'Income Level (IDR)', | ||||
|                       hintText: 'Select Income ', | ||||
|                       ctrl: provider.ctrlIncome, | ||||
|                       listItem: provider.listIncome, | ||||
|                       onSelect: (value) {}, | ||||
|                     ), | ||||
|                     SelectFormView( | ||||
|                       name: 'Marital Status', | ||||
|                       hintText: 'Select Marital Status ', | ||||
|                       ctrl: provider.ctrlMarital, | ||||
|                       listItem: provider.listMarital, | ||||
|                       onSelect: (value) {}, | ||||
|                     ), | ||||
|                     SelectFormView( | ||||
|                       name: 'Source of Fund', | ||||
|                       hintText: 'Select Source of Fund ', | ||||
|                       ctrl: provider.ctrlSourceFund, | ||||
|                       listItem: provider.listSourceFund, | ||||
|                       onSelect: (value) {}, | ||||
|                     ), | ||||
|                     Align( | ||||
|                       alignment: Alignment.bottomCenter, | ||||
|                       child: ButtonView( | ||||
|                         name: 'Next', | ||||
|                         onPressed: () async { | ||||
|                           await provider.next(context).then((value) { | ||||
|                             if (value) { | ||||
|                               routePush(context, | ||||
|                                   page: const SubmissionParent()); | ||||
|                             } | ||||
|                           }); | ||||
|                         }, | ||||
|                       ), | ||||
|                     ) | ||||
|                   ], | ||||
|                 ), | ||||
|               ), | ||||
|             ); | ||||
|           }); | ||||
|   | ||||
| @@ -0,0 +1,51 @@ | ||||
| import 'package:cims_apps/application/assets/path_assets.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/component/list_tile/list_tile_view.dart'; | ||||
| import 'package:cims_apps/application/component/text_caption/text_caption.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/submission_data/submit_signature/submit_signature.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
|  | ||||
| class InitialSignature extends StatelessWidget { | ||||
|   const InitialSignature({Key? key}) : super(key: key); | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return MultiProvider( | ||||
|         providers: [ | ||||
|           ChangeNotifierProvider( | ||||
|             create: (context) => SubmissionDataViewModel(), | ||||
|           ) | ||||
|         ], | ||||
|         builder: (context, child) { | ||||
|           return Consumer<SubmissionDataViewModel>( | ||||
|               builder: (context, provider, child) { | ||||
|             return Column( | ||||
|               crossAxisAlignment: CrossAxisAlignment.start, | ||||
|               children: [ | ||||
|                 const TextCaption(title: 'Draw your digital sign'), | ||||
|                 const ImageView(image: PathAssets.frameSignature), | ||||
|                 const ListTileView( | ||||
|                     title: | ||||
|                         'Make sure the sign you draw is match with your ID Card'), | ||||
|                 SizedBox(height: SizeConfig.height * .07), | ||||
|                 ButtonView( | ||||
|                   name: 'Next', | ||||
|                   onPressed: () { | ||||
|                     provider.next(context).then((value) { | ||||
|                       if (value) { | ||||
|                         routePush(context, page: const SubmitSignature()); | ||||
|                       } | ||||
|                     }); | ||||
|                   }, | ||||
|                 ) | ||||
|               ], | ||||
|             ); | ||||
|           }); | ||||
|         }); | ||||
|   } | ||||
| } | ||||
| @@ -0,0 +1,100 @@ | ||||
| import 'dart:ui' as ui; | ||||
|  | ||||
| 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/list_tile/list_tile_view.dart'; | ||||
| import 'package:cims_apps/application/component/text_caption/text_caption.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/submission_data/submission_parent.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart'; | ||||
| import 'package:dotted_border/dotted_border.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
| import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; | ||||
|  | ||||
| class SubmitSignature extends StatelessWidget { | ||||
|   const SubmitSignature({Key? key}) : super(key: key); | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     GlobalKey<SfSignaturePadState> signaturePadKey = GlobalKey(); | ||||
|     return ChangeNotifierProvider( | ||||
|         create: (context) => SubmissionDataViewModel(), | ||||
|         builder: (context, child) { | ||||
|           return Scaffold( | ||||
|             appBar: AppBar( | ||||
|               toolbarHeight: 70, | ||||
|               backgroundColor: Colors.white, | ||||
|               surfaceTintColor: Colors.white, | ||||
|               automaticallyImplyLeading: false, | ||||
|               title: Row( | ||||
|                 mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                 children: [ | ||||
|                   const BackButtonView(), | ||||
|                   const Text('Registration'), | ||||
|                   SizedBox( | ||||
|                     width: SizeConfig.width * 0.1, | ||||
|                   ) | ||||
|                 ], | ||||
|               ), | ||||
|               shape: const RoundedRectangleBorder( | ||||
|                   side: BorderSide(color: ColorPalette.slate200)), | ||||
|             ), | ||||
|             body: Container( | ||||
|               padding: const EdgeInsets.all(16.0), | ||||
|               child: Consumer<SubmissionDataViewModel>( | ||||
|                   builder: (context, provider, child) { | ||||
|                 return Column( | ||||
|                   crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                   children: [ | ||||
|                     const TextCaption(title: 'Draw your digital sign'), | ||||
|                     SizedBox( | ||||
|                       height: SizeConfig.height * .28, | ||||
|                       child: DottedBorder( | ||||
|                         color: ColorPalette.primary, | ||||
|                         borderType: BorderType.RRect, | ||||
|                         radius: const Radius.circular(8), | ||||
|                         padding: const EdgeInsets.all(6), | ||||
|                         strokeWidth: 2.0, | ||||
|                         dashPattern: const [14, 0, 0, 8], | ||||
|                         child: SfSignaturePad( | ||||
|                           key: signaturePadKey, | ||||
|                           backgroundColor: Colors.white, | ||||
|                         ), | ||||
|                       ), | ||||
|                     ), | ||||
|                     const ListTileView( | ||||
|                         title: | ||||
|                             'Make sure the sign you draw is match with your ID Card'), | ||||
|                     const Spacer(), | ||||
|                     Row( | ||||
|                       mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|                       children: [ | ||||
|                         ButtonView( | ||||
|                           name: 'Delete', | ||||
|                           isOutlined: true, | ||||
|                           width: SizeConfig.width * .42, | ||||
|                           onPressed: () { | ||||
|                             signaturePadKey.currentState?.clear(); | ||||
|                           }, | ||||
|                         ), | ||||
|                         ButtonView( | ||||
|                           name: 'Next', | ||||
|                           width: SizeConfig.width * .42, | ||||
|                           onPressed: () async { | ||||
|                             // ui.Image image = await _signaturePadKey.currentState!.toImage(); | ||||
|                             routePush(context, page: const SubmissionParent()); | ||||
|                           }, | ||||
|                         ), | ||||
|                       ], | ||||
|                     ) | ||||
|                   ], | ||||
|                 ); | ||||
|               }), | ||||
|             ), | ||||
|           ); | ||||
|         }); | ||||
|   } | ||||
| } | ||||
| @@ -1,7 +1,11 @@ | ||||
| import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.dart'; | ||||
| import 'package:cims_apps/application/component/button/button_view.dart'; | ||||
| import 'package:cims_apps/application/component/set_pin_view/set_pin_view.dart'; | ||||
| import 'package:cims_apps/application/theme/color_palette.dart'; | ||||
| import 'package:cims_apps/core/route/route.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/viewmodel/submission_data_viewmodel.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:provider/provider.dart'; | ||||
|  | ||||
| class TermsAndConditionView extends StatelessWidget { | ||||
|   const TermsAndConditionView({super.key}); | ||||
| @@ -22,69 +26,82 @@ class TermsAndConditionView extends StatelessWidget { | ||||
|       'I am willing to provide my data and information from PT Gemilang  Indonesia Manajemen Investasi to groups' | ||||
|     ]; | ||||
|  | ||||
|     return Scaffold( | ||||
|       appBar: CustomAppBar( | ||||
|           height: 70, | ||||
|           title: 'Terms And Condition' | ||||
|       ), | ||||
|       body: SingleChildScrollView( | ||||
|         padding: EdgeInsets.all(24), | ||||
|         child: Column( | ||||
|           children: [ | ||||
|             Text( | ||||
|               'In relevance with the data that i have submitted and in relation to the purchase of Mutual Fund Products, I hereby declare that:', | ||||
|               style: TextStyle( | ||||
|                   fontWeight: FontWeight.w600, | ||||
|                   color: ColorPalette.slate800 | ||||
|     return ChangeNotifierProvider( | ||||
|         create: (context) => SubmissionDataViewModel(), | ||||
|         builder: (context, child) { | ||||
|           return Scaffold( | ||||
|             appBar: | ||||
|                 const CustomAppBar(height: 70, title: 'Terms And Condition'), | ||||
|             body: SingleChildScrollView( | ||||
|               padding: const EdgeInsets.all(24), | ||||
|               child: Column( | ||||
|                 children: [ | ||||
|                   const Text( | ||||
|                     'In relevance with the data that i have submitted and in relation to the purchase of Mutual Fund Products, I hereby declare that:', | ||||
|                     style: TextStyle( | ||||
|                         fontWeight: FontWeight.w600, | ||||
|                         color: ColorPalette.slate800), | ||||
|                   ), | ||||
|                   const SizedBox(height: 12), | ||||
|                   ...listRules.asMap().entries.map((e) { | ||||
|                     return Padding( | ||||
|                       padding: EdgeInsets.only(top: e.key != 0 ? 12 : 0), | ||||
|                       child: Row( | ||||
|                         crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                         children: [ | ||||
|                           Text('${e.key + 1}', | ||||
|                               style: const TextStyle( | ||||
|                                   color: ColorPalette.slate500)), | ||||
|                           const SizedBox(width: 12), | ||||
|                           Expanded( | ||||
|                               child: Text(e.value, | ||||
|                                   style: const TextStyle( | ||||
|                                       color: ColorPalette.slate500))) | ||||
|                         ], | ||||
|                       ), | ||||
|                     ); | ||||
|                   }) | ||||
|                 ], | ||||
|               ), | ||||
|             ), | ||||
|             SizedBox(height: 12), | ||||
|             ...listRules.asMap().entries.map((e) { | ||||
|               return Padding( | ||||
|                 padding: EdgeInsets.only(top: e.key != 0 ? 12 : 0), | ||||
|             bottomNavigationBar: Consumer<SubmissionDataViewModel>( | ||||
|                 builder: (context, provider, child) { | ||||
|               return Container( | ||||
|                 height: 84, | ||||
|                 padding: const EdgeInsets.symmetric(horizontal: 24), | ||||
|                 child: Row( | ||||
|                   crossAxisAlignment: CrossAxisAlignment.start, | ||||
|                   children: [ | ||||
|                     Text('${e.key + 1}', style: TextStyle(color: ColorPalette.slate500)), | ||||
|                     SizedBox(width: 12), | ||||
|                     Expanded( | ||||
|                         child: Text(e.value, style: TextStyle(color: ColorPalette.slate500)) | ||||
|                     ) | ||||
|                         child: ButtonView( | ||||
|                       name: 'Decline', | ||||
|                       onPressed: () { | ||||
|                         Navigator.pop(context); | ||||
|                       }, | ||||
|                       marginVertical: 16, | ||||
|                       backgroundColor: ColorPalette.white, | ||||
|                       textColor: ColorPalette.primary, | ||||
|                       isOutlined: true, | ||||
|                       borderColor: ColorPalette.primary, | ||||
|                     )), | ||||
|                     const SizedBox(width: 16), | ||||
|                     Expanded( | ||||
|                         child: ButtonView( | ||||
|                             name: 'Accept', | ||||
|                             onPressed: () { | ||||
|                               provider.nextSubmission(context); | ||||
|                               routePush(context, | ||||
|                                   routeType: RouteType.pushReplace, | ||||
|                                   page: SetPinView( | ||||
|                                     currentPin: '', | ||||
|                                     submitPin: (context, pin) {}, | ||||
|                                   )); | ||||
|                             }, | ||||
|                             marginVertical: 16)) | ||||
|                   ], | ||||
|                 ), | ||||
|               ); | ||||
|             }) | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|       bottomNavigationBar: Container( | ||||
|         height: 84, | ||||
|         padding: EdgeInsets.symmetric(horizontal: 24), | ||||
|         color: Colors.red, | ||||
|         child: Row( | ||||
|           children: [ | ||||
|             Expanded( | ||||
|                 child: ButtonView( | ||||
|                   name: 'Decline', | ||||
|                   onPressed: () {}, | ||||
|                   marginVertical: 16, | ||||
|                   backgroundColor: ColorPalette.white, | ||||
|                   textColor: ColorPalette.primary, | ||||
|                   isOutlined: true, | ||||
|                   borderColor: ColorPalette.primary, | ||||
|                 ) | ||||
|             ), | ||||
|             SizedBox(width: 16), | ||||
|             Expanded( | ||||
|                 child: ButtonView( | ||||
|                     name: 'Accept', | ||||
|                     onPressed: () {}, | ||||
|                     marginVertical: 16 | ||||
|                 ) | ||||
|             ) | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|             }), | ||||
|           ); | ||||
|         }); | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -1,12 +1,59 @@ | ||||
| import 'package:camera/camera.dart'; | ||||
| import 'package:cims_apps/application/component/select_form/select_form_view.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:shared_preferences/shared_preferences.dart'; | ||||
|  | ||||
| class SubmissionDataViewModel extends ChangeNotifier { | ||||
|   SubmissionDataViewModel() { | ||||
|     _getData(); | ||||
|   } | ||||
|  | ||||
|   static int _currentStep = 1; | ||||
|   int get getCurrentStep => _currentStep; | ||||
|   int stepAmount = 9; | ||||
|   bool _isEmailVerify = false; | ||||
|   bool get isEmailVerify => _isEmailVerify; | ||||
|   var formKeyPersonalData = GlobalKey<FormState>(); | ||||
|   TextEditingController ctrlOccupation = TextEditingController(); | ||||
|   TextEditingController ctrlIncome = TextEditingController(); | ||||
|   TextEditingController ctrlMarital = TextEditingController(); | ||||
|   TextEditingController ctrlSourceFund = TextEditingController(); | ||||
|   TextEditingController ctrlBankName = TextEditingController(); | ||||
|   int step = 1; | ||||
|  | ||||
|   List<ItemSelectForm> listOccupation = [ | ||||
|     ItemSelectForm('key1', 'Student'), | ||||
|     ItemSelectForm('key2', 'Entrepreneur'), | ||||
|     ItemSelectForm('key3', 'Civil Servant'), | ||||
|   ]; | ||||
|   List<ItemSelectForm> listIncome = [ | ||||
|     ItemSelectForm('key1', '< 10 million/year'), | ||||
|     ItemSelectForm('key2', '10 – 50 million/year'), | ||||
|     ItemSelectForm('key3', '50 – 100 million/year'), | ||||
|   ]; | ||||
|   List<ItemSelectForm> listMarital = [ | ||||
|     ItemSelectForm('key1', 'Single'), | ||||
|     ItemSelectForm('key2', 'Married'), | ||||
|     ItemSelectForm('key3', 'Divorced'), | ||||
|   ]; | ||||
|   List<ItemSelectForm> listSourceFund = [ | ||||
|     ItemSelectForm('key1', 'Revenue'), | ||||
|     ItemSelectForm('key2', 'Business Profit'), | ||||
|     ItemSelectForm('key3', 'Saving interest'), | ||||
|   ]; | ||||
|  | ||||
|   List<ItemSelectForm> listBank = [ | ||||
|     ItemSelectForm('key1', 'BCA'), | ||||
|     ItemSelectForm('key2', 'BRI'), | ||||
|     ItemSelectForm('key3', 'BNI'), | ||||
|     ItemSelectForm('key4', 'BANK MANDIRI'), | ||||
|     ItemSelectForm('key5', 'CIMB NIAGA'), | ||||
|   ]; | ||||
|  | ||||
|   List<ItemSelectForm> listImg = [ | ||||
|     ItemSelectForm('', 'ID Card', image: ''), | ||||
|     ItemSelectForm('', 'Selfie with ID Card', image: ''), | ||||
|   ]; | ||||
|  | ||||
|   Future<List<CameraDescription>> initCamera() async { | ||||
|     final cameras = await availableCameras(); | ||||
| @@ -34,6 +81,27 @@ class SubmissionDataViewModel extends ChangeNotifier { | ||||
|     } else { | ||||
|       //ToDo : Go To next step after completing the submission | ||||
|     } | ||||
|  | ||||
|     notifyListeners(); | ||||
|   } | ||||
|  | ||||
|   Future<bool> next(BuildContext context) async { | ||||
|     if (getCurrentStep < stepAmount) { | ||||
|       _currentStep++; | ||||
|       notifyListeners(); | ||||
|       return true; | ||||
|     } | ||||
|     return false; | ||||
|   } | ||||
|  | ||||
|   Future<void> _getData() async { | ||||
|     SharedPreferences prefs = await SharedPreferences.getInstance(); | ||||
|     String? imagePath = prefs.getString('imagePath'); | ||||
|     String? imagePathSelfie = prefs.getString('imagePathSelfie'); | ||||
|     if (imagePath != null && imagePathSelfie != null) { | ||||
|       listImg[0].image = imagePath; | ||||
|       listImg[1].image = imagePathSelfie; | ||||
|     } | ||||
|     notifyListeners(); | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -5,8 +5,8 @@ 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/login/view/login_view.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/initial_registration_step.dart'; | ||||
| import 'package:cims_apps/features/auth/registration/view/registration_view.dart'; | ||||
| import 'package:cims_apps/features/bottom_navigation_view.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
|  | ||||
| class DashboardPublicView extends StatelessWidget { | ||||
| @@ -38,10 +38,12 @@ class DashboardPublicView extends StatelessWidget { | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Scaffold( | ||||
|       body: Container( | ||||
|         padding: const EdgeInsets.symmetric( | ||||
|           vertical: 32.0, | ||||
|           horizontal: 24.0, | ||||
|       body: SingleChildScrollView( | ||||
|         padding: const EdgeInsets.only( | ||||
|           top: 32.0, | ||||
|           bottom: 8.0, | ||||
|           left: 24.0, | ||||
|           right: 24.0, | ||||
|         ), | ||||
|         child: Column( | ||||
|           crossAxisAlignment: CrossAxisAlignment.start, | ||||
| @@ -93,7 +95,9 @@ class DashboardPublicView extends StatelessWidget { | ||||
|                 image: PathAssets.iconGoogle, | ||||
|                 width: 26, | ||||
|               ), | ||||
|               onPressed: () {}, | ||||
|               onPressed: () { | ||||
|                 routePush(context, page: const InitialRegistrationStep()); | ||||
|               }, | ||||
|             ), | ||||
|             Row( | ||||
|               mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||
|   | ||||
| @@ -33,6 +33,43 @@ class MyApp extends StatelessWidget { | ||||
|             )), | ||||
|         fontFamily: 'Manrope', | ||||
|         scaffoldBackgroundColor: Colors.white, | ||||
|         textTheme: const TextTheme( | ||||
|           displaySmall: TextStyle( | ||||
|             fontSize: 14, | ||||
|             fontWeight: FontWeight.w500, | ||||
|             color: ColorPalette.slate800, | ||||
|           ), | ||||
|           displayMedium: TextStyle( | ||||
|             fontSize: 16, | ||||
|             fontWeight: FontWeight.w600, | ||||
|             color: ColorPalette.slate800, | ||||
|           ), | ||||
|           displayLarge: TextStyle( | ||||
|             fontSize: 16, | ||||
|             fontWeight: FontWeight.bold, | ||||
|             color: ColorPalette.slate800, | ||||
|           ), | ||||
|           bodyMedium: TextStyle( | ||||
|             fontSize: 14, | ||||
|             fontWeight: FontWeight.w600, | ||||
|             color: ColorPalette.slate500, | ||||
|           ), | ||||
|           bodyLarge: TextStyle( | ||||
|             fontSize: 16, | ||||
|             fontWeight: FontWeight.bold, | ||||
|             color: ColorPalette.slate500, | ||||
|           ), | ||||
|           headlineSmall: TextStyle( | ||||
|             fontSize: 16, | ||||
|             fontWeight: FontWeight.bold, | ||||
|             color: ColorPalette.slate800, | ||||
|           ), | ||||
|           headlineLarge: TextStyle( | ||||
|             fontSize: 28, | ||||
|             fontWeight: FontWeight.bold, | ||||
|             color: ColorPalette.slate800, | ||||
|           ), | ||||
|         ), | ||||
|         colorScheme: const ColorScheme.light().copyWith( | ||||
|           primary: const Color(0xff2563EB), | ||||
|           onPrimary: const Color(0xFFFF9130), | ||||
|   | ||||
							
								
								
									
										66
									
								
								pubspec.lock
									
									
									
									
									
								
							
							
						
						
									
										66
									
								
								pubspec.lock
									
									
									
									
									
								
							| @@ -153,6 +153,14 @@ packages: | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "1.0.6" | ||||
|   dotted_border: | ||||
|     dependency: "direct main" | ||||
|     description: | ||||
|       name: dotted_border | ||||
|       sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04" | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "2.1.0" | ||||
|   equatable: | ||||
|     dependency: transitive | ||||
|     description: | ||||
| @@ -480,6 +488,62 @@ packages: | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "0.27.7" | ||||
|   shared_preferences: | ||||
|     dependency: "direct main" | ||||
|     description: | ||||
|       name: shared_preferences | ||||
|       sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "2.2.2" | ||||
|   shared_preferences_android: | ||||
|     dependency: transitive | ||||
|     description: | ||||
|       name: shared_preferences_android | ||||
|       sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "2.2.1" | ||||
|   shared_preferences_foundation: | ||||
|     dependency: transitive | ||||
|     description: | ||||
|       name: shared_preferences_foundation | ||||
|       sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "2.3.5" | ||||
|   shared_preferences_linux: | ||||
|     dependency: transitive | ||||
|     description: | ||||
|       name: shared_preferences_linux | ||||
|       sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "2.3.2" | ||||
|   shared_preferences_platform_interface: | ||||
|     dependency: transitive | ||||
|     description: | ||||
|       name: shared_preferences_platform_interface | ||||
|       sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "2.3.2" | ||||
|   shared_preferences_web: | ||||
|     dependency: transitive | ||||
|     description: | ||||
|       name: shared_preferences_web | ||||
|       sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "2.2.2" | ||||
|   shared_preferences_windows: | ||||
|     dependency: transitive | ||||
|     description: | ||||
|       name: shared_preferences_windows | ||||
|       sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" | ||||
|       url: "https://pub.dev" | ||||
|     source: hosted | ||||
|     version: "2.3.2" | ||||
|   sky_engine: | ||||
|     dependency: transitive | ||||
|     description: flutter | ||||
| @@ -663,4 +727,4 @@ packages: | ||||
|     version: "6.5.0" | ||||
| sdks: | ||||
|   dart: ">=3.2.3 <4.0.0" | ||||
|   flutter: ">=3.13.0" | ||||
|   flutter: ">=3.16.0" | ||||
|   | ||||
| @@ -49,6 +49,8 @@ dependencies: | ||||
|   path_provider: ^2.1.2 | ||||
|   path: ^1.8.3 | ||||
|   syncfusion_flutter_signaturepad: ^24.2.4 | ||||
|   dotted_border: ^2.1.0 | ||||
|   shared_preferences: ^2.2.2 | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user