fix: term condition page
This commit is contained in:
parent
a6248520ef
commit
e86e67b9c9
|
@ -3,8 +3,8 @@ import 'package:cims_apps/application/component/button/button_view.dart';
|
||||||
import 'package:cims_apps/application/theme/color_palette.dart';
|
import 'package:cims_apps/application/theme/color_palette.dart';
|
||||||
import 'package:cims_apps/core/route/route.dart';
|
import 'package:cims_apps/core/route/route.dart';
|
||||||
import 'package:cims_apps/core/utils/size_config.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/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:flutter/material.dart';
|
||||||
|
|
||||||
class ResultsView extends StatelessWidget {
|
class ResultsView extends StatelessWidget {
|
||||||
|
@ -24,7 +24,7 @@ class ResultsView extends StatelessWidget {
|
||||||
title: Row(
|
title: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
BackButtonView(),
|
const BackButtonView(),
|
||||||
const Text('Risk Profile', textAlign: TextAlign.center),
|
const Text('Risk Profile', textAlign: TextAlign.center),
|
||||||
SizedBox(width: SizeConfig.width * 0.1)
|
SizedBox(width: SizeConfig.width * 0.1)
|
||||||
],
|
],
|
||||||
|
@ -33,7 +33,7 @@ class ResultsView extends StatelessWidget {
|
||||||
side: BorderSide(color: ColorPalette.slate200)),
|
side: BorderSide(color: ColorPalette.slate200)),
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
padding: EdgeInsets.all(24),
|
padding: const EdgeInsets.all(24),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -49,21 +49,21 @@ class ResultsView extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(24),
|
padding: const EdgeInsets.all(24),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
typeResult.type,
|
typeResult.type,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
color: ColorPalette.white),
|
color: ColorPalette.white),
|
||||||
),
|
),
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 16,
|
height: 16,
|
||||||
),
|
),
|
||||||
Text(
|
const Text(
|
||||||
'Total Score :',
|
'Total Score :',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
@ -72,7 +72,7 @@ class ResultsView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
totalScore,
|
totalScore,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 28,
|
fontSize: 28,
|
||||||
color: ColorPalette.white),
|
color: ColorPalette.white),
|
||||||
|
@ -84,29 +84,30 @@ class ResultsView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
Text(typeResult.desc,
|
Text(typeResult.desc,
|
||||||
style: TextStyle(color: ColorPalette.slate500, fontSize: 16)),
|
style: const TextStyle(
|
||||||
SizedBox(
|
color: ColorPalette.slate500, fontSize: 16)),
|
||||||
|
const SizedBox(
|
||||||
height: 24,
|
height: 24,
|
||||||
),
|
),
|
||||||
Text(
|
const Text(
|
||||||
'Suitable Product',
|
'Suitable Product',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ColorPalette.slate800,
|
color: ColorPalette.slate800,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 16),
|
fontSize: 16),
|
||||||
),
|
),
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 16,
|
height: 16,
|
||||||
),
|
),
|
||||||
Wrap(
|
Wrap(
|
||||||
runSpacing: 16,
|
runSpacing: 16,
|
||||||
children: typeResult.suitableProduct.map((e) {
|
children: typeResult.suitableProduct.map((e) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
border: Border.all(color: ColorPalette.slate200),
|
border: Border.all(color: ColorPalette.slate200),
|
||||||
|
@ -114,7 +115,7 @@ class ResultsView extends StatelessWidget {
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(8),
|
padding: const EdgeInsets.all(8),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
|
@ -122,13 +123,13 @@ class ResultsView extends StatelessWidget {
|
||||||
child: Image.asset(e['icon'],
|
child: Image.asset(e['icon'],
|
||||||
width: SizeConfig.width * 0.07,
|
width: SizeConfig.width * 0.07,
|
||||||
color: typeResult.color)),
|
color: typeResult.color)),
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
width: 12,
|
width: 12,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
e['desc'],
|
e['desc'],
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: ColorPalette.slate800),
|
color: ColorPalette.slate800),
|
||||||
|
@ -139,7 +140,7 @@ class ResultsView extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 32,
|
height: 32,
|
||||||
),
|
),
|
||||||
ButtonView(
|
ButtonView(
|
||||||
|
@ -152,22 +153,21 @@ class ResultsView extends StatelessWidget {
|
||||||
isOutlined: true,
|
isOutlined: true,
|
||||||
textSize: 16,
|
textSize: 16,
|
||||||
heightWrapContent: true,
|
heightWrapContent: true,
|
||||||
contentPadding: EdgeInsets.all(16),
|
contentPadding: const EdgeInsets.all(16),
|
||||||
width: SizeConfig.width,
|
width: SizeConfig.width,
|
||||||
),
|
),
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 16,
|
height: 16,
|
||||||
),
|
),
|
||||||
ButtonView(
|
ButtonView(
|
||||||
name: 'Confirm',
|
name: 'Confirm',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
//TODO route ke terms condition
|
routePush(context, page: const TermsAndConditionView());
|
||||||
routePush(context, page: DialogSuccess());
|
|
||||||
},
|
},
|
||||||
marginVertical: 0,
|
marginVertical: 0,
|
||||||
textSize: 16,
|
textSize: 16,
|
||||||
heightWrapContent: true,
|
heightWrapContent: true,
|
||||||
contentPadding: EdgeInsets.all(16),
|
contentPadding: const EdgeInsets.all(16),
|
||||||
width: SizeConfig.width,
|
width: SizeConfig.width,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.dart';
|
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/button/button_view.dart';
|
||||||
import 'package:cims_apps/application/theme/color_palette.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:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class TermsAndConditionView extends StatelessWidget {
|
class TermsAndConditionView extends StatelessWidget {
|
||||||
const TermsAndConditionView({super.key});
|
const TermsAndConditionView({super.key});
|
||||||
|
@ -22,34 +26,37 @@ class TermsAndConditionView extends StatelessWidget {
|
||||||
'I am willing to provide my data and information from PT Gemilang Indonesia Manajemen Investasi to groups'
|
'I am willing to provide my data and information from PT Gemilang Indonesia Manajemen Investasi to groups'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
return ChangeNotifierProvider(
|
||||||
|
create: (context) => SubmissionDataViewModel(),
|
||||||
|
builder: (context, child) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: CustomAppBar(
|
appBar:
|
||||||
height: 70,
|
const CustomAppBar(height: 70, title: 'Terms And Condition'),
|
||||||
title: 'Terms And Condition'
|
|
||||||
),
|
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
padding: EdgeInsets.all(24),
|
padding: const EdgeInsets.all(24),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
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:',
|
'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(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: ColorPalette.slate800
|
color: ColorPalette.slate800),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 12),
|
||||||
SizedBox(height: 12),
|
|
||||||
...listRules.asMap().entries.map((e) {
|
...listRules.asMap().entries.map((e) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.only(top: e.key != 0 ? 12 : 0),
|
padding: EdgeInsets.only(top: e.key != 0 ? 12 : 0),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text('${e.key + 1}', style: TextStyle(color: ColorPalette.slate500)),
|
Text('${e.key + 1}',
|
||||||
SizedBox(width: 12),
|
style: const TextStyle(
|
||||||
|
color: ColorPalette.slate500)),
|
||||||
|
const SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(e.value, style: TextStyle(color: ColorPalette.slate500))
|
child: Text(e.value,
|
||||||
)
|
style: const TextStyle(
|
||||||
|
color: ColorPalette.slate500)))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -57,34 +64,40 @@ class TermsAndConditionView extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
bottomNavigationBar: Container(
|
bottomNavigationBar: Consumer<SubmissionDataViewModel>(
|
||||||
|
builder: (context, provider, child) {
|
||||||
|
return Container(
|
||||||
height: 84,
|
height: 84,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24),
|
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||||
color: Colors.red,
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ButtonView(
|
child: ButtonView(
|
||||||
name: 'Decline',
|
name: 'Decline',
|
||||||
onPressed: () {},
|
onPressed: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
marginVertical: 16,
|
marginVertical: 16,
|
||||||
backgroundColor: ColorPalette.white,
|
backgroundColor: ColorPalette.white,
|
||||||
textColor: ColorPalette.primary,
|
textColor: ColorPalette.primary,
|
||||||
isOutlined: true,
|
isOutlined: true,
|
||||||
borderColor: ColorPalette.primary,
|
borderColor: ColorPalette.primary,
|
||||||
)
|
)),
|
||||||
),
|
const SizedBox(width: 16),
|
||||||
SizedBox(width: 16),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ButtonView(
|
child: ButtonView(
|
||||||
name: 'Accept',
|
name: 'Accept',
|
||||||
onPressed: () {},
|
onPressed: () {
|
||||||
marginVertical: 16
|
provider.nextSubmission(context);
|
||||||
)
|
routePush(context,
|
||||||
)
|
page: const SubmissionParent());
|
||||||
|
},
|
||||||
|
marginVertical: 16))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user