feat: submit data id card
This commit is contained in:
parent
3dca727a5e
commit
4bad9cd18c
|
@ -0,0 +1,218 @@
|
|||
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/utils/size_config.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SubmissionDataIdCard extends StatelessWidget {
|
||||
const SubmissionDataIdCard({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,
|
||||
builder: (BuildContext context) {
|
||||
return StatefulBuilder(
|
||||
builder: (context, setState) {
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius:
|
||||
BorderRadius.vertical(top: Radius.circular(18))),
|
||||
height: SizeConfig.height * .32,
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
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: () => Navigator.pop(context),
|
||||
icon: const Icon(
|
||||
Icons.close,
|
||||
color: ColorPalette.slate400,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
const Text(
|
||||
'We only request data in accordance with OJK regulations. Your data is encrypted and will not be shared with third parties without your consent.',
|
||||
style: TextStyle(
|
||||
color: ColorPalette.slate400,
|
||||
),
|
||||
),
|
||||
ButtonView(
|
||||
name: 'OK',
|
||||
isOutlined: true,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget photoDocument() {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Text(
|
||||
'Photo Document',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: ColorPalette.slate800,
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: 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,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: SizeConfig.width * .43,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
e['tag'],
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: ColorPalette.slate800,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 38,
|
||||
child: IconButton(
|
||||
style: IconButton.styleFrom(
|
||||
backgroundColor: Colors.white,
|
||||
shape: const CircleBorder(
|
||||
side: BorderSide(
|
||||
color: ColorPalette.slate200))),
|
||||
onPressed: () {},
|
||||
icon: const Icon(
|
||||
Icons.camera_alt_outlined,
|
||||
color: ColorPalette.slate500,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}).toList(),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
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,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user