import 'package:fikoyt_mesaici/core/Extensions/fiko_tarih.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:vrouter/vrouter.dart'; import '../../model/calisma_kayit/calisma_kayit.dart'; ButtonStyle stil = TextButton.styleFrom( alignment: Alignment.center, fixedSize: const Size.fromHeight(20), // backgroundColor: Colors.grey.shade50, shape: BeveledRectangleBorder( borderRadius: BorderRadius.circular(5.0), ), ); class AltButonlar extends StatelessWidget { const AltButonlar({super.key, required this.kayit}); final Rx? kayit; @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(5), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Expanded( child: Obx( () => TextButton( onPressed: () { kayit?.value?.servisGecikmesi = !kayit!.value!.servisGecikmesi; kayit?.refresh(); }, style: stil, child: Icon( Icons.bus_alert, size: 16, color: kayit?.value?.servisGecikmesi == true ? Colors.orange : Colors.grey.shade300, ), ), ), ), Expanded( child: Obx( () => TextButton( onPressed: () { kayit?.value?.resmiTatil = !kayit!.value!.resmiTatil; kayit?.refresh(); }, style: stil, child: Icon( Icons.flag, size: 16, color: kayit?.value?.resmiTatil == true ? Colors.orange : Colors.grey.shade300, ), ), ), ), Expanded( child: Obx( () => TextButton( onPressed: () { kayit?.value?.raporlu = !kayit!.value!.raporlu; kayit?.value?.gunlukIzinli = false; kayit?.value?.yillikIzinli = false; kayit?.refresh(); }, style: stil, child: Icon( Icons.heart_broken, size: 16, color: kayit?.value?.raporlu == true ? Colors.orange : Colors.grey.shade300, ), ), ), ), Expanded( child: Obx( () => TextButton( onPressed: () { kayit?.value?.gunlukIzinli = !kayit!.value!.gunlukIzinli; kayit?.value?.raporlu = false; kayit?.value?.yillikIzinli = false; kayit?.refresh(); }, style: stil, child: Icon( Icons.hotel, size: 16, color: kayit?.value?.gunlukIzinli == true ? Colors.orange : Colors.grey.shade300, ), ), ), ), Expanded( child: Obx( () => TextButton( onPressed: () { kayit?.value?.yillikIzinli = !kayit!.value!.yillikIzinli; kayit?.value?.raporlu = false; kayit?.value?.gunlukIzinli = false; kayit?.refresh(); }, style: stil, child: Icon( Icons.pool, size: 16, color: kayit?.value?.yillikIzinli == true ? Colors.orange : Colors.grey.shade300, ), ), ), ), // Expanded( // child: Obx( // () => TextButton( // onPressed: () { // kayit?.value?.yolParasiVar = !kayit!.value!.yolParasiVar; // kayit?.refresh(); // }, // style: TextButton.styleFrom( // alignment: Alignment.center, // fixedSize: const Size.fromHeight(20), // backgroundColor: Colors.grey.shade50, // shape: const BeveledRectangleBorder(borderRadius: BorderRadius.zero), // ), // child: Icon( // Icons.local_gas_station, // size: 16, // color: kayit?.value?.yolParasiVar == true ? Colors.orange : Colors.grey.shade300, // ), // ), // ), // ), // Expanded( // child: Obx( // () => TextButton( // onPressed: () { // kayit?.value?.yemekParasiVar = !kayit!.value!.yemekParasiVar; // kayit?.refresh(); // }, // style: TextButton.styleFrom( // alignment: Alignment.center, // fixedSize: const Size.fromHeight(20), // backgroundColor: Colors.grey.shade50, // shape: const BeveledRectangleBorder(borderRadius: BorderRadius.zero), // ), // child: Icon( // Icons.fastfood, // size: 16, // color: kayit?.value?.yemekParasiVar == true ? Colors.orange : Colors.grey.shade300, // ), // ), // ), // ), // Expanded( // child: TextButton( // style: stil, // child: const Text("💬"), // onPressed: () { // context.vRouter.to("/mesaici/hareketler/gun-hareketleri/${kayit?.value?.tarih!.formatla("dd.MM.yyyy EEEE")}"); // }, // ), // ), ], ), ); } }