import 'package:fikoyt_mesaici/apps/mesaici/servisler/fikoyt.mesaici.service.dart'; import 'package:fikoyt_mesaici/apps/mesaici/widgets/aktif_kart/calisma_suresi_sec.dart'; import 'package:fikoyt_mesaici/core/Extensions/fiko_duration_ext.dart'; import 'package:fikoyt_mesaici/core/fikoyt.service.dart'; import 'package:fikoyt_mesaici/core/interface/fiko_dialog_ayarlari.dart'; import 'package:fikoyt_mesaici/core/widgets/fiko_ui/fiko_button/fiko_button.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:get/get.dart'; import 'package:vrouter/vrouter.dart'; import '../../model/calisma_kayit/calisma_kayit.dart'; class YillikIzinli extends StatelessWidget { YillikIzinli({super.key, required this.kayit}); final Rx? kayit; FikoYTMesaiciService servisMesaici = Get.put(FikoYTMesaiciService()); FikoYTService servisFikoYT = FikoYTService(); @override Widget build(BuildContext context) { return Container( width: double.infinity, padding: const EdgeInsets.all(5), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), // color: Colors.transparent, border: Border.all(color: Colors.grey.shade400), boxShadow: [ BoxShadow( color: Colors.black.withOpacity(0.15), ), BoxShadow( color: Colors.grey.shade200, spreadRadius: -5.0, blurRadius: 12.0, ), ]), child: Column( children: [ const Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Icon(Icons.pool, size: 48, color: Colors.green), ], ), AnimatedFikoButton1( text: "Yıllık İzinli", textColor: Colors.green, textStrokeColor: Colors.amber, textSize: 16, ), Wrap( alignment: WrapAlignment.center, crossAxisAlignment: WrapCrossAlignment.center, children: [ AnimatedFikoButton1( text: "Maaşa Ve Çalışma Saatine", textColor: Colors.black, textStrokeColor: Colors.transparent, textSize: 12, radius: 0, edgePadding: EdgeInsets.zero, ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ AnimatedFikoButton1( text: "(${kayit?.value?.calismaSuresi?.insanizeEk(yoksa: '0 Saat') ?? const Duration().insanizeEk(yoksa: '0 Saat')})", textColor: Colors.green, textStrokeColor: Colors.transparent, textSize: 12, edgePadding: EdgeInsets.zero, onPressed: () { FikoYTService.dialogGoster( context, CalismaSuresiSecWidget(kayit: kayit), FikoDialogAyarlari(baslik: "Çalışma Süresi", baslikSimge: "🛠️", altButonlar: [ TextButton( onPressed: () { kayit?.value?.calismaSuresi = null; kayit?.refresh(); context.vRouter.pop(); }, child: const Text( "Sıfırla", style: TextStyle(color: Colors.redAccent, fontWeight: FontWeight.bold), ), ), const Spacer(), TextButton( onPressed: () { context.vRouter.pop(); // Navigator.of(context, rootNavigator: true).pop(); }, child: const Text( "Kapat", style: TextStyle(color: Colors.green, fontWeight: FontWeight.bold), ), ), ]), ); }, ), AnimatedFikoButton1( text: "Eklenecek", textColor: Colors.black, textStrokeColor: Colors.transparent, textSize: 12, edgePadding: EdgeInsets.zero, ), ], ), ], ), ], ), ).animate(effects: [ FadeEffect(duration: 1000.ms), SaturateEffect(delay: 1000.ms, duration: 500.ms, curve: Curves.easeIn), BlurEffect( duration: 600.ms, begin: const Offset(3, 3), end: const Offset(0, 0), ), ShimmerEffect( delay: 1000.ms, duration: 1000.ms, curve: Curves.easeIn, ), ]).animate( autoPlay: true, effects: [ ShakeEffect( delay: 5000.ms, duration: 2000.ms, curve: Curves.easeInOut, rotation: 0.02, hz: 4, ) ], onComplete: (controller) { controller.loop(); }, ); } }