import 'package:fikoyt_akcali/core/Extensions/fiko_tarih.dart'; import 'package:fikoyt_akcali/core/widgets/fiko_ui/fiko_button/fiko_button.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../model/calisma_kayit/calisma_kayit.dart'; class CikisSecici extends StatelessWidget { const CikisSecici({super.key, required this.kayit}); final Rx? kayit; @override Widget build(BuildContext context) { return Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Obx( () => FikoButton1( text: kayit?.value?.cikis != null ? kayit!.value!.cikis!.formatla("dd MMMM yyyy EEEE HH:mm:ss") : "Buraya Tıklayarak Zaman Seçiniz", textSize: 13, textColor: Colors.black, textStrokeColor: Colors.transparent, onPressed: () async { kayit?.value?.cikis = kayit?.value?.cikis != null ? await kayit?.value?.cikis?.tarihSaatSec(context, varsayilanTarihSaat: kayit?.value?.cikis) : await DateTime.now().tarihSaatSec(context); kayit?.refresh(); }, ), ), ], ), const SizedBox( height: 5, ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ FikoButton1( text: "⏳ Çıkış Saati", textSize: 10, edgePadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 1), textColor: Colors.black, textStrokeColor: Colors.transparent, borderColor: Colors.blue, onPressed: () { kayit?.value?.normalCikisiYap(); kayit?.refresh(); }, ), const SizedBox( width: 5, ), FikoButton1( text: "⏳ Şimdi", textSize: 10, edgePadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 1), textColor: Colors.black, textStrokeColor: Colors.transparent, borderColor: Colors.blue, onPressed: () { kayit?.value?.cikis = DateTime.now(); kayit?.refresh(); }, ), ], ), ], ); } }