Merge pull request 'bayu/dev' (#11) from bayu/dev into dev

Reviewed-on: #11
This commit is contained in:
nugrohob825 2024-02-16 18:10:48 +07:00
commit 66ace5b217
18 changed files with 673 additions and 271 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

@ -37,6 +37,8 @@ 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';
/// IMAGE
static const String imgSplashLogo = 'assets/images/splash-logo.png';
@ -70,4 +72,6 @@ class PathAssets {
static const String imgGuideBank = 'assets/images/img-guide-bank.png';
static const String imgGuide1 = 'assets/images/img-guide1.png';
static const String imgGuide2 = 'assets/images/img-guide2.png';
static const String frameSignature = 'assets/images/frame-signature.png';
static const String imgFinish = 'assets/images/img-finish.png';
}

View 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(),
],
),
);
}
}

View File

@ -0,0 +1,40 @@
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());
},
)
],
),
),
);
}
}

View File

@ -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());
},
),
],
)
],
),
),
),
);
}
}

View File

@ -6,7 +6,9 @@ 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/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';
class SubmitBankAccount extends StatelessWidget {
const SubmitBankAccount({Key? key}) : super(key: key);
@ -20,37 +22,48 @@ class SubmitBankAccount extends StatelessWidget {
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',
listItem: listForm,
onSelect: (value) {},
),
TextFormView(
name: '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'),
const Text(
"Make sure the account you use is in your name, not someone else's",
style: TextStyle(
color: ColorPalette.slate400,
),
),
],
);
}),
);
});
}
}

View File

@ -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,21 @@ 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());
},
marginVertical: 0,
textSize: 16,
heightWrapContent: true,
contentPadding: EdgeInsets.all(16),
contentPadding: const EdgeInsets.all(16),
width: SizeConfig.width,
)
],

View File

@ -1,5 +1,4 @@
import 'package:cims_apps/application/assets/path_assets.dart';
import 'package:cims_apps/application/component/button/back_button_view.dart';
import 'package:cims_apps/application/component/button/button_view.dart';
import 'package:cims_apps/application/component/image/image_view.dart';
import 'package:cims_apps/application/theme/color_palette.dart';
@ -13,93 +12,75 @@ class RiskProfileView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
toolbarHeight: 70,
backgroundColor: Colors.white,
surfaceTintColor: Colors.white,
automaticallyImplyLeading: false,
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
BackButtonView(),
const Text('Risk Profile', textAlign: TextAlign.center),
SizedBox(width: SizeConfig.width * 0.1)
],
),
shape: const RoundedRectangleBorder(
side: BorderSide(color: ColorPalette.slate200)),
),
body: Container(
width: SizeConfig.width,
height: SizeConfig.height,
padding: EdgeInsets.all(24),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
children: [
ImageView(image: PathAssets.imgDataReport),
SizedBox(
height: 24,
),
Text(
'Know Your Risk Profile',
textAlign: TextAlign.center,
style: TextStyle(
color: ColorPalette.slate800,
fontWeight: FontWeight.bold,
fontSize: 24),
),
SizedBox(
height: 12,
),
Text(
'We will provide recommendations that match your profile and risk tolerance level.',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: ColorPalette.slate500),
),
],
),
Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ImageView(
image: PathAssets.iconShield,
width: 20,
height: 22,
),
SizedBox(
width: 8,
),
Text(
'Your data is secure and encrypted',
style: TextStyle(
fontWeight: FontWeight.w600,
color: ColorPalette.primary,
fontSize: 16),
)
],
),
SizedBox(
height: 24,
),
ButtonView(
name: "Let's Start",
onPressed: () {
routePush(context, page: QuestionView());
},
marginVertical: 0,
)
],
)
],
),
return Container(
width: SizeConfig.width,
height: SizeConfig.height,
padding: EdgeInsets.all(24),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
children: [
ImageView(image: PathAssets.imgDataReport),
SizedBox(
height: 24,
),
Text(
'Know Your Risk Profile',
textAlign: TextAlign.center,
style: TextStyle(
color: ColorPalette.slate800,
fontWeight: FontWeight.bold,
fontSize: 24),
),
SizedBox(
height: 12,
),
Text(
'We will provide recommendations that match your profile and risk tolerance level.',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: ColorPalette.slate500),
),
],
),
Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ImageView(
image: PathAssets.iconShield,
width: 20,
height: 22,
),
SizedBox(
width: 8,
),
Text(
'Your data is secure and encrypted',
style: TextStyle(
fontWeight: FontWeight.w600,
color: ColorPalette.primary,
fontSize: 16),
)
],
),
SizedBox(
height: 24,
),
ButtonView(
name: "Let's Start",
onPressed: () {
routePush(context, page: QuestionView());
},
marginVertical: 0,
)
],
)
],
),
);
}

View File

@ -1,13 +1,18 @@
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/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/confirm_bank_account.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/view/submission_data/submit_signature/submit_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 +29,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 +56,26 @@ 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");
}
}
_contentPush(int index) {
switch (index) {
case 6:
routePush(context, page: const ConfirmBankAccount());
case 7:
routePush(context, page: const SubmitSignature());
// case 8:
// return const RiskProfileView();
// case 9:
// return Container(
// child: Text("Step 9"),
// );
}
}
@ -77,15 +91,30 @@ 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: 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: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -111,7 +140,8 @@ class _SubmissionParentState extends State<SubmissionParent> {
),
),
provider.getCurrentStep == 3 ||
provider.getCurrentStep == 4
provider.getCurrentStep == 4 ||
provider.getCurrentStep == 8
? const SizedBox()
: Align(
alignment: Alignment.bottomCenter,
@ -119,16 +149,17 @@ class _SubmissionParentState extends State<SubmissionParent> {
name: 'Next',
marginVertical: 16.0,
onPressed: () {
_contentPush(provider.getCurrentStep);
provider.nextSubmission(context);
},
),
)
],
);
}),
],
),
),
),
],
),
);
}),
);
});
}

View File

@ -0,0 +1,33 @@
import 'package:cims_apps/application/assets/path_assets.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/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 const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextCaption(title: 'Draw your digital sign'),
ImageView(image: PathAssets.frameSignature),
ListTileView(
title:
'Make sure the sign you draw is match with your ID Card'),
],
);
});
}
}

View File

@ -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());
},
),
],
)
],
);
}),
),
);
});
}
}

View File

@ -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/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';
class TermsAndConditionView extends StatelessWidget {
const TermsAndConditionView({super.key});
@ -22,69 +26,78 @@ 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,
page: const SubmissionParent());
},
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
)
)
],
),
),
);
}),
);
});
}
}

View File

@ -34,6 +34,7 @@ class SubmissionDataViewModel extends ChangeNotifier {
} else {
//ToDo : Go To next step after completing the submission
}
notifyListeners();
}
}

View File

@ -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 {
@ -39,9 +39,11 @@ class DashboardPublicView extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
body: Container(
padding: const EdgeInsets.symmetric(
vertical: 32.0,
horizontal: 24.0,
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,

View File

@ -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:

View File

@ -49,6 +49,7 @@ dependencies:
path_provider: ^2.1.2
path: ^1.8.3
syncfusion_flutter_signaturepad: ^24.2.4
dotted_border: ^2.1.0