import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:scanktpflutter/app/app_extension.dart'; import '../../app/constant.dart'; import '../../model/person_ktp_model.dart'; class CardRiwayatScan extends HookConsumerWidget { final PersonKtp data; const CardRiwayatScan({ super.key, required this.data, }); @override Widget build(BuildContext context, WidgetRef ref) { SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [ SystemUiOverlay.bottom, ]); return GestureDetector( onTap: () { FocusManager.instance.primaryFocus!.unfocus(); }, child: Card( elevation: 2, color: Constant.textWhite, child: Padding( padding: EdgeInsets.all( Constant.getActualYPhone(context: context, y: 12), ), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( data.personNIK, style: Constant.titleInputan600(context: context).copyWith( color: Constant.textBlack, ), ), InkWell( onTap: (){ print('id : ${data.personID}'); }, child: Icon( Icons.edit, color: Constant.bgButton, size: 20, ), ), ], ), SizedBox( height: Constant.getActualYPhone( context: context, y: 12, ), ), // row nama Row( children: [ Icon( Icons.person_2_outlined, color: Constant.bgIcon, size: 20, ), SizedBox( width: Constant.getActualXPhone( context: context, x: 8, ), ), Text( data.personName, style: Constant.cardText(context: context).copyWith( color: Constant.textCardGrey, ), ), ], ), // row nama SizedBox( height: Constant.getActualYPhone( context: context, y: 10, ), ), // row dob Row( children: [ Icon( Icons.date_range_outlined, color: Constant.bgIcon, size: 20, ), SizedBox( width: Constant.getActualXPhone( context: context, x: 8, ), ), Text( formatDateJiffy(data.personDob), style: Constant.cardText(context: context).copyWith( color: Constant.textCardGrey, ), ), ], ), // row dob SizedBox( height: Constant.getActualYPhone( context: context, y: 10, ), ), // row jenis kelamin Row( children: [ Image.asset( 'images/icongender.png', width: Constant.getActualXPhone( context: context, x: 20, ), height: Constant.getActualYPhone( context: context, y: 20, ), fit: BoxFit.cover, ), SizedBox( width: Constant.getActualXPhone( context: context, x: 8, ), ), Text( data.personSex, style: Constant.cardText(context: context).copyWith( color: Constant.textCardGrey, ), ), ], ), // row jenis kelamin ], ), ), ), ); } }