112 lines
3.6 KiB
Dart
112 lines
3.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import '../../model/edit_voice_to_text_model.dart';
|
|
import '../../model/voice_to_text_model.dart';
|
|
import '../../app/app_extension.dart';
|
|
|
|
import '../../app/constant.dart';
|
|
import '../../provider/voice_to_text_provider.dart';
|
|
|
|
class CardRiwayatRekaman extends HookConsumerWidget {
|
|
final VoiceToTextModel data;
|
|
const CardRiwayatRekaman({
|
|
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(
|
|
formatDateJiffyDMYHIS(
|
|
data.Voice2text_Created,
|
|
),
|
|
style: Constant.titleInputan600(context: context).copyWith(
|
|
color: Constant.textBlack,
|
|
),
|
|
),
|
|
InkWell(
|
|
onTap: () {
|
|
// print('id : ${data.personID}');
|
|
ref.read(selectedVoiceIdx.notifier).state =
|
|
data.Voice2text_ID;
|
|
|
|
ref.read(selectedEdit.notifier).state = EditVoiceToTextModel(
|
|
Voice2text_ID: data.Voice2text_ID,
|
|
Voice2text_Note: data.Voice2text_Note,
|
|
Voice2text_Url: data.Voice2text_Url,
|
|
Voice2text_Created: data.Voice2text_Created,
|
|
Voice2text_IsActive: data.Voice2text_IsActive,
|
|
Voice2text_JsonData: data.Voice2text_JsonData,
|
|
Voice2text_Text: data.Voice2text_Text,
|
|
Voice2text_Updated: data.Voice2text_Updated,
|
|
Voice2text_User_ID: data.Voice2text_User_ID,
|
|
);
|
|
// Navigator.of(context).pushNamed(
|
|
// editRekamanRoute,
|
|
// );
|
|
},
|
|
child: Icon(
|
|
Icons.edit,
|
|
color: Constant.bgButton,
|
|
size: 20,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: Constant.getActualYPhone(
|
|
context: context,
|
|
y: 12,
|
|
),
|
|
),
|
|
// row note
|
|
Row(
|
|
children: [
|
|
Icon(
|
|
Icons.note_outlined,
|
|
color: Constant.bgIcon,
|
|
size: 20,
|
|
),
|
|
SizedBox(
|
|
width: Constant.getActualXPhone(
|
|
context: context,
|
|
x: 8,
|
|
),
|
|
),
|
|
Text(
|
|
data.Voice2text_Note,
|
|
style: Constant.cardText(context: context).copyWith(
|
|
color: Constant.textCardGrey,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|