// ignore_for_file: library_private_types_in_public_api import 'package:fikoyt_mesaici/apps/mesaici/model/ayarlar/model_ayarlar.dart'; import 'package:fikoyt_mesaici/apps/mesaici/model/calisma_kayit/calisma_kayit.dart'; import 'package:fikoyt_mesaici/apps/mesaici/model/model_hareketler.dart'; import 'package:fikoyt_mesaici/apps/mesaici/pages/hareketler/takvim_gun.dart'; import 'package:fikoyt_mesaici/apps/mesaici/pages/hareketler/veri_ekleyicisi/veri_ekleyicisi.dart'; import 'package:fikoyt_mesaici/apps/mesaici/widgets/ozet_aylik/ozet_aylik.dart'; import 'package:fikoyt_mesaici/core/Extensions/fiko_duration_ext.dart'; import 'package:fikoyt_mesaici/core/Extensions/fiko_tarih.dart'; import 'package:fikoyt_mesaici/core/fikoyt.service.dart'; import 'package:fikoyt_ui/fikoyt_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:isar/isar.dart'; import 'package:table_calendar/table_calendar.dart'; import '../../../../core/widgets/base_page/base_page_view.dart'; import '../../../../core/widgets/fikoyt_elastic/fikoyt_elastic.dart'; import '../../widgets/kullanici_bilgi_navigasyon/kullanici_bilgi_navigasyon.dart'; import '../../widgets/uygulama_baslik/uygulama_baslik.dart'; class PageMesaiciHareketlerLogic extends GetxController { // final FikoYTMesaiciService FikoYTService.servisMesaici = Get.put(FikoYTMesaiciService()); RxBool gosterVeriEkleyici = false.obs; /** */ // Rx aktifAy = DateTime.now().obs; // sonrakiAy() { // aktifAy.value = DateTime(aktifAy.value.year, aktifAy.value.month + 1); // aktifAy.refresh(); // } // oncekiAy() { // aktifAy.value = DateTime(aktifAy.value.year, aktifAy.value.month - 1); // aktifAy.refresh(); // } /** */ // RxList liste = [].obs; // late StreamSubscription> listeWatch; // RxString listeTuru = "liste".obs; /** */ // Stream> liste = [] as Stream>; // @override // void onInit() { // // TODO: implement onInit // liste = FikoYTService.servisMesaici.isar?.modelHareketlers.where().sortByTarih().watch(); // super.onInit(); // } /** */ @override void onInit() { // TODO: implement onInit // alHareketler(); // listeWatch = FikoYTService.servisMesaici.isar?.modelHareketlers.where().filter().turuEqualTo(KartTuru.CALISMA_KARTI).sortByTarih().watch().listen( // (data) { // liste.value = data; // liste.refresh(); // }, // ); // aktifAy.listen( // (p0) { // print("${aktifAy.value.ayinIlkGunu()}, ${aktifAy.value.ayinSonGunu()}"); // }, // ); super.onInit(); } @override void onClose() { // TODO: implement onClose // if (listeWatch.isPaused != true) listeWatch.cancel(); super.onClose(); } // Future?> alHareketler() async { // liste = (FikoYTService.servisMesaici.isar?.modelHareketlers.where().sortByTarih().findAllSync()).obs; // return liste; // } // List alHareketlerSync() { // return (FikoYTService.servisMesaici.isar?.modelHareketlers.where().filter().turuEqualTo(KartTuru.CALISMA_KARTI).calismaKarti((q) => q.tarihBetween(aktifAy.value.ayinIlkGunu(), aktifAy.value.ayinSonGunu())).sortByTarihDesc().findAllSync()); // } // Future> alHareketler() async { // return (FikoYTService.servisMesaici.isar?.modelHareketlers.where().filter().turuEqualTo(KartTuru.CALISMA_KARTI).calismaKarti((q) => q.tarihBetween(aktifAy.value.ayinIlkGunu(), aktifAy.value.ayinSonGunu())).sortByTarihDesc().findAll()); // } // Stream> dinleHareketler() async* { // yield* FikoYTService.servisMesaici.isar?.modelHareketlers.where().filter().turuEqualTo(KartTuru.CALISMA_KARTI).calismaKarti((q) => q.tarihBetween(aktifAy.value.ayinIlkGunu(), aktifAy.value.ayinSonGunu())).sortByTarihDesc().watch(); // } } class PageMesaiciHareketler extends StatefulWidget { const PageMesaiciHareketler({super.key}); @override _PageMesaiciHareketlerState createState() => _PageMesaiciHareketlerState(); } class _PageMesaiciHareketlerState extends State { PageMesaiciHareketlerLogic logic = Get.put(PageMesaiciHareketlerLogic()); BasePageLogic basePageLogic = Get.put(BasePageLogic()); //---> // final GlobalKey globalKeysAktifGun = GlobalKey(); // final scrollController = ScrollController(); @override void initState() { super.initState(); // WidgetsBinding.instance.addPostFrameCallback((_) async { // await Future.delayed(const Duration(milliseconds: 1000)); // RenderObject? aktifAyObject = globalKeysAktifGun.currentContext?.findRenderObject(); // // print(globalKeysAktifAy); // if (aktifAyObject != null) { // basePageLogic.scrollController.position.ensureVisible( // aktifAyObject, // alignment: 0.1, // How far into view the item should be scrolled (between 0 and 1). // duration: const Duration(seconds: 1), // ); // } // }); } @override void dispose() { Get.delete(); // scrollController.dispose(); super.dispose(); } @override Widget build(BuildContext context) { SchedulerBinding.instance.addPostFrameCallback((_) { basePageLogic.subTitle.value = "πŸ“± Hareketler"; // print(context.vRouter.pathParameters["ay"]); }); ScreenSizeTypes screenType = FikoYTElastic.getScreenSizeType(context); [ // ScreenSizeTypes.small, ScreenSizeTypes.mini, ScreenSizeTypes.extraMini ].contains(screenType); return FikoYTSliverApp( scrollController: basePageLogic.scrollController, leading: const UygulamaBaslikSol(), title: UygulamaBaslikOrta(), actions: const [ UygulamaBaslikSag(), ], headerWidget: PageView( children: [ Container( color: Colors.transparent, //Colors.orange, height: 300 - kToolbarHeight - 10, margin: const EdgeInsets.only(top: kToolbarHeight, bottom: 10, right: 10, left: 10), child: KullaniciBilgiNavigasyon( simge: const Text( "πŸ“±", style: TextStyle( fontSize: 54, ), ), ), ), ], ), bodyColor: Colors.transparent, body: [ Row( crossAxisAlignment: CrossAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end, children: [ FikoYTButton( text: Icon( Icons.help_outline_rounded, color: Colors.blue.withAlpha(100), size: 24, ), tema: Theme.of(context).extension()?.copyWith( radius: 32, ), // backColor: Colors.amber.withAlpha(80), // borderColor: Colors.amber.withAlpha(200), route: "/mesaici/yardim/konu=hareketler", ), ], ), Container( padding: const EdgeInsets.symmetric(horizontal: 10), child: Column( children: [ OzetAylik(), ], ), ), Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ FikoYTButton( text: "⏳ Veri Ekleyicisi", tema: Theme.of(context).extension()?.copyWith( fontSize: 10, edgePadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 1), backgroundColor: Colors.white, textColor: Colors.black, textStrokeColor: Colors.transparent, borderColor: Colors.blue, ), onPressed: () async { logic.gosterVeriEkleyici.toggle(); }, ), /** */ ], ), Obx( () => AnimatedSwitcher( duration: const Duration(milliseconds: 500), transitionBuilder: (Widget child, Animation animation) { return SizeTransition( sizeFactor: animation, child: FadeTransition(opacity: animation, child: child), ); }, child: logic.gosterVeriEkleyici.value ? Container( key: const ValueKey("VeriEkleyici"), margin: const EdgeInsets.all(10), child: VeriEkleyicisi(), ) : null, ), ), Obx( () => Row( mainAxisAlignment: MainAxisAlignment.end, children: [ FikoYTButton( text: "πŸ“…", tema: Theme.of(context).extension()?.copyWith( backgroundColor: FikoYTService.servisMesaici.ayarlarModel?.value.uygulamaAyarlari.listelemeTipi == ListelemeTipi.TAKVIM ? Colors.blue : Colors.transparent, edgePadding: const EdgeInsets.only( right: 1, left: 4, top: 2, bottom: 2, ), // borderRadius: const BorderRadius.only( // bottomLeft: Radius.circular(0), // topLeft: Radius.circular(0), // ), radius: 0, borderColor: Colors.lightBlueAccent, ), onPressed: () { FikoYTService.servisMesaici.ayarlarModel?.value.uygulamaAyarlari.listelemeTipi = ListelemeTipi.TAKVIM; FikoYTService.servisMesaici.ayarlarModel?.refresh(); }, ), FikoYTButton( text: "☰", tema: Theme.of(context).extension()?.copyWith( backgroundColor: FikoYTService.servisMesaici.ayarlarModel?.value.uygulamaAyarlari.listelemeTipi == ListelemeTipi.LISTE ? Colors.blue : Colors.transparent, edgePadding: const EdgeInsets.only( right: 4, left: 1, top: 2, bottom: 2, ), // borderRadius: const BorderRadius.only( // topRight: Radius.circular(0), // bottomRight: Radius.circular(0), // ), radius: 0, borderColor: Colors.lightBlueAccent, ), onPressed: () { FikoYTService.servisMesaici.ayarlarModel?.value.uygulamaAyarlari.listelemeTipi = ListelemeTipi.LISTE; FikoYTService.servisMesaici.ayarlarModel?.refresh(); }, ), ], ), ), // Row( // children: [ // FikoYTButton( // text: "<", // textSize: 16, // edgePadding: const EdgeInsets.symmetric(horizontal: 5), // onPressed: () { // FikoYTService.servisMesaici.oncekiAy(); // FikoYTService.servisMesaici.aktifAy.refresh(); // }, // ), // Expanded( // child: Obx( // () => AnimatedFikoYTButton1( // text: (DateTime.now().formatla("MMMM yyyy") == FikoYTService.servisMesaici.aktifAy.value.formatla("MMMM yyyy") ? "πŸ‘‰πŸ»" : "") + FikoYTService.servisMesaici.aktifAy.value.formatla('MMMM yyyy'), // textSize: 16, // onPressed: () { // FikoYTService.servisMesaici.simdikiAy(); // FikoYTService.servisMesaici.aktifAy.refresh(); // }, // ), // // AnimatedSwitcher( // // duration: const Duration(milliseconds: 750), // // transitionBuilder: (Widget child, Animation animation) { // // return FadeTransition(opacity: animation, child: child); // // }, // // child: FikoYTButton( // // key: ValueKey(FikoYTService.servisMesaici.aktifAy.value.formatla('MMMM yyyy')), // // text: (DateTime.now().formatla("MMMM yyyy") == FikoYTService.servisMesaici.aktifAy.value.formatla("MMMM yyyy") ? "πŸ‘‰πŸ»" : "") + FikoYTService.servisMesaici.aktifAy.value.formatla('MMMM yyyy'), // // textSize: 16, // // onPressed: () { // // FikoYTService.servisMesaici.simdikiAy(); // // FikoYTService.servisMesaici.aktifAy.refresh(); // // }, // // ), // // ), // ), // ), // FikoYTButton( // text: ">", // textSize: 16, // edgePadding: const EdgeInsets.symmetric(horizontal: 5), // onPressed: () { // FikoYTService.servisMesaici.sonrakiAy(); // FikoYTService.servisMesaici.aktifAy.refresh(); // }, // ), // ], // ), Container( padding: const EdgeInsets.symmetric(horizontal: 10), child: Column( children: [ // OzetAylik(), // Row( // crossAxisAlignment: CrossAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center, // children: [ // FikoYTButton( // text: "⏳ Veri Ekleyicisi", // textSize: 10, // edgePadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 1), // backColor: Colors.white, // textColor: Colors.black, // textStrokeColor: Colors.transparent, // borderColor: Colors.blue, // onPressed: () async { // logic.gosterVeriEkleyici.toggle(); // }, // ), // /** */ // ], // ), /** */ // Obx( // () => AnimatedSwitcher( // duration: const Duration(milliseconds: 500), // transitionBuilder: (Widget child, Animation animation) { // return SizeTransition( // sizeFactor: animation, // child: FadeTransition(opacity: animation, child: child), // ); // }, // child: logic.gosterVeriEkleyici.value ? VeriEkleyicisi() : null, // ), // ), /** */ Obx( () => AnimatedSwitcher( duration: const Duration(milliseconds: 1000), transitionBuilder: (Widget child, Animation animation) { return SizeTransition( sizeFactor: animation, child: FadeTransition(opacity: animation, child: child), ); }, layoutBuilder: (Widget? currentChild, List previousChildren) { return Stack( alignment: Alignment.topCenter, children: [ ...previousChildren, if (currentChild != null) currentChild, ], ); }, child: FikoYTService.servisMesaici.ayarlarModel?.value.uygulamaAyarlari.listelemeTipi == ListelemeTipi.TAKVIM ? Obx( key: const ValueKey("Takvim"), () { FikoYTService.servisMesaici.aktifAy.value; return Column( children: [ Row( children: [ FikoYTButton( text: "<", tema: Theme.of(context).extension()?.copyWith( fontSize: 14, edgePadding: const EdgeInsets.symmetric(horizontal: 5), textColor: Theme.of(context).extension()?.textColor, ), onPressed: () { FikoYTService.servisMesaici.oncekiAy(); FikoYTService.servisMesaici.aktifAy.refresh(); }, ), Expanded( child: Obx( () => FikoYTButton( text: (DateTime.now().formatla("MMMM yyyy") == FikoYTService.servisMesaici.aktifAy.value.formatla("MMMM yyyy") ? "πŸ‘‰πŸ»" : "") + FikoYTService.servisMesaici.aktifAy.value.formatla('MMMM yyyy'), tema: Theme.of(context).extension()?.copyWith( fontSize: 18, textColor: Theme.of(context).extension()?.textColor, ), onPressed: () { FikoYTService.servisMesaici.simdikiAy(); FikoYTService.servisMesaici.aktifAy.refresh(); }, ), // AnimatedSwitcher( // duration: const Duration(milliseconds: 750), // transitionBuilder: (Widget child, Animation animation) { // return FadeTransition(opacity: animation, child: child); // }, // child: FikoYTButton( // key: ValueKey(FikoYTService.servisMesaici.aktifAy.value.formatla('MMMM yyyy')), // text: (DateTime.now().formatla("MMMM yyyy") == FikoYTService.servisMesaici.aktifAy.value.formatla("MMMM yyyy") ? "πŸ‘‰πŸ»" : "") + FikoYTService.servisMesaici.aktifAy.value.formatla('MMMM yyyy'), // textSize: 16, // onPressed: () { // FikoYTService.servisMesaici.simdikiAy(); // FikoYTService.servisMesaici.aktifAy.refresh(); // }, // ), // ), ), ), FikoYTButton( text: ">", tema: Theme.of(context).extension()?.copyWith( fontSize: 16, edgePadding: const EdgeInsets.symmetric(horizontal: 5), textColor: Theme.of(context).extension()?.textColor, ), onPressed: () { FikoYTService.servisMesaici.sonrakiAy(); FikoYTService.servisMesaici.aktifAy.refresh(); }, ), ], ), TableCalendar( focusedDay: FikoYTService.servisMesaici.aktifAy.value.ayinIlkGunu(), firstDay: DateTime(0).yilinIlkGunu(), lastDay: DateTime(3000).yilinSonGunu(), locale: "TR_tr", availableGestures: AvailableGestures.none, availableCalendarFormats: const { CalendarFormat.month: "Ay", }, onPageChanged: (focusedDay) { FikoYTService.servisMesaici.aktifAy.value = focusedDay; FikoYTService.servisMesaici.aktifAy.refresh(); }, headerVisible: false, weekNumbersVisible: false, daysOfWeekVisible: false, enabledDayPredicate: (s) => true, calendarStyle: const CalendarStyle( isTodayHighlighted: false, weekendDecoration: BoxDecoration(color: Colors.amber, borderRadius: BorderRadius.all(Radius.circular(5))), cellPadding: EdgeInsets.zero, tablePadding: EdgeInsets.zero, cellMargin: EdgeInsets.all(1), todayDecoration: BoxDecoration(color: Colors.blueAccent, borderRadius: BorderRadius.all(Radius.circular(5))), todayTextStyle: TextStyle( fontWeight: FontWeight.bold, ), outsideDaysVisible: false, canMarkersOverflow: false, defaultDecoration: BoxDecoration( borderRadius: BorderRadius.all( Radius.circular(5), ), ), ), rowHeight: 70, pageAnimationEnabled: false, startingDayOfWeek: StartingDayOfWeek.monday, sixWeekMonthsEnforced: false, calendarBuilders: CalendarBuilders( headerTitleBuilder: (context, day) { final text = day.formatla("MMMM yyyy"); return Center( child: FikoYTButton( text: "${(DateTime.now().formatla("MMMM yyyy") == day.formatla("MMMM yyyy") ? "πŸ‘‰πŸ»" : "")} $text", tema: Theme.of(context).extension()?.copyWith( fontSize: 16, fontWeight: FontWeight.bold, textColor: Theme.of(context).extension()?.textColor, // textColor: Colors.blue, // textStrokeColor: Colors.transparent, ), onPressed: () { FikoYTService.servisMesaici.simdikiAy(); FikoYTService.servisMesaici.aktifAy.refresh(); }, ), ); }, // dowBuilder: (context, day) { // if (day.weekday == DateTime.sunday || day.weekday == DateTime.saturday) { // final text = day.formatla("E"); // return Center( // child: Text( // text, // style: TextStyle(color: (day.weekday == DateTime.sunday || day.weekday == DateTime.saturday) ? Colors.red : Colors.blue), // ), // ); // } // }, defaultBuilder: (context, day, focusedDay) { final text = day.formatla("dd EEE"); List hrktlr = FikoYTService.servisMesaici.isar?.modelHareketlers.where().filter().turuEqualTo(KartTuru.CALISMA_KARTI).calismaKarti((q) => q.tarihBetween(day.ilkSaatler(), day.sonSaatler())).sortByTarihDesc().findAllSync() ?? []; // for (var i = 0; i < hrktlr.length; i++) { // print(hrktlr[i].calismaKarti.) // } return TakvimGun( text: "${(DateTime.now().formatla("dd.MM.yyyy EEEE") == day.formatla("dd.MM.yyyy EEEE") ? "πŸ‘‰πŸ»" : "")}$text", hrktlr: hrktlr, day: day, ).animate(effects: [const FadeEffect(), const ScaleEffect()]); }, ), ) ], ); }, ) : Obx( key: const ValueKey("Liste"), () { FikoYTService.servisMesaici.aktifAy.value; return Column( children: [ Row( children: [ FikoYTButton( text: "<", tema: Theme.of(context).extension()?.copyWith( fontSize: 14, edgePadding: const EdgeInsets.symmetric(horizontal: 5), textColor: Theme.of(context).extension()?.textColor, ), onPressed: () { FikoYTService.servisMesaici.oncekiAy(); FikoYTService.servisMesaici.aktifAy.refresh(); }, ), Expanded( child: Obx( () => FikoYTButton( text: (DateTime.now().formatla("MMMM yyyy") == FikoYTService.servisMesaici.aktifAy.value.formatla("MMMM yyyy") ? "πŸ‘‰πŸ»" : "") + FikoYTService.servisMesaici.aktifAy.value.formatla('MMMM yyyy'), tema: Theme.of(context).extension()?.copyWith( fontSize: 18, textColor: Theme.of(context).extension()?.textColor, ), onPressed: () { FikoYTService.servisMesaici.simdikiAy(); FikoYTService.servisMesaici.aktifAy.refresh(); }, ), // AnimatedSwitcher( // duration: const Duration(milliseconds: 750), // transitionBuilder: (Widget child, Animation animation) { // return FadeTransition(opacity: animation, child: child); // }, // child: FikoYTButton( // key: ValueKey(FikoYTService.servisMesaici.aktifAy.value.formatla('MMMM yyyy')), // text: (DateTime.now().formatla("MMMM yyyy") == FikoYTService.servisMesaici.aktifAy.value.formatla("MMMM yyyy") ? "πŸ‘‰πŸ»" : "") + FikoYTService.servisMesaici.aktifAy.value.formatla('MMMM yyyy'), // textSize: 16, // onPressed: () { // FikoYTService.servisMesaici.simdikiAy(); // FikoYTService.servisMesaici.aktifAy.refresh(); // }, // ), // ), ), ), FikoYTButton( text: ">", tema: Theme.of(context).extension()?.copyWith( fontSize: 16, edgePadding: const EdgeInsets.symmetric(horizontal: 5), textColor: Theme.of(context).extension()?.textColor, ), onPressed: () { FikoYTService.servisMesaici.sonrakiAy(); FikoYTService.servisMesaici.aktifAy.refresh(); }, ), ], ), FutureBuilder( future: FikoYTService.servisMesaici.alHareketler(), builder: (context, snapshot) { if (snapshot.hasData) { final gunler = snapshot.data; // if (todos!.isNotEmpty) { return AnimatedSwitcher( duration: const Duration(milliseconds: 750), transitionBuilder: (Widget child, Animation animation) { return FadeTransition( opacity: animation, child: SizeTransition( sizeFactor: animation, axisAlignment: 2, // fixedCrossAxisSizeFactor: 1, axis: Axis.vertical, child: child, ), ); }, child: AnimatedCrossFade( key: ValueKey(FikoYTService.servisMesaici.aktifAy.value.formatla("MMMM yyyy")), duration: const Duration(milliseconds: 300), crossFadeState: gunler!.isNotEmpty ? CrossFadeState.showFirst : CrossFadeState.showSecond, firstChild: ListView.separated( padding: const EdgeInsets.symmetric(vertical: 10.0), physics: const BouncingScrollPhysics(), shrinkWrap: true, itemCount: gunler.length, separatorBuilder: (context, index) => const SizedBox( height: 5, ), itemBuilder: (context, index) { final gun = gunler[index]; return Dismissible( direction: DismissDirection.endToStart, // this will only allow slide to left. dismissThresholds: const {DismissDirection.endToStart: 0.4}, key: UniqueKey(), background: Row( children: [ const Spacer(), FikoYTButton( text: const Icon( Icons.delete, color: Colors.red, size: 14, ), ), ], ), confirmDismiss: (direction) async { return true; }, onDismissed: (direction) async { gunler.removeAt(index); await FikoYTService.servisMesaici.isar?.writeTxn( () async { await FikoYTService.servisMesaici.isar?.modelHareketlers.delete(gun.id); }, ); FikoYTService.servisMesaici.aktifAy.refresh(); }, child: FikoYTButton( tema: Theme.of(context).extension()?.copyWith( backgroundColor: DateTime.now().formatla("dd.MM.yyyy EEEE") == gun.calismaKarti?.tarih!.formatla("dd.MM.yyyy EEEE") ? Colors.blue.shade200 : gun.calismaKarti?.gunTuru == GunTuru.HAFTA_TATILI ? Colors.yellowAccent : gun.calismaKarti?.gunTuru == GunTuru.DINLENME_GUNU ? Colors.yellowAccent : Colors.white, borderColor: Colors.black12, edgePadding: const EdgeInsets.symmetric(vertical: 2, horizontal: 5), ), text: Row( children: [ if (DateTime.now().formatla("dd.MM.yyyy EEEE") == gun.calismaKarti?.tarih!.formatla("dd.MM.yyyy EEEE")) const Text( "πŸ‘‰πŸ»", ), const Text("πŸ“…"), Text( // key: DateTime.now().formatla("dd.MM.yyyy EEEE") == gun.tarih!.formatla("dd.MM.yyyy EEEE") ? globalKeysAktifGun : null, gun.calismaKarti?.tarih?.formatla("dd.MM.yyyy EEEE") ?? "Tarih SeΓ§", ), const Spacer(), // FikoYTButton( // text: todo.calismaKarti?.normalMesai?.insanizeSure() ?? "Yok", // textColor: Colors.black, // textStrokeColor: Colors.transparent, // ), // FikoYTButton(text: "+"), // FikoYTButton( // text: todo.calismaKarti?.fazlaMesai?.insanizeSure() ?? "Yok", // textColor: Colors.black, // textStrokeColor: Colors.transparent, // ), // FikoYTButton(text: "="), FikoYTButton( text: gun.calismaKarti?.calisilanSure?.insanize ?? "Yok", tema: Theme.of(context).extension()?.copyWith( textColor: Colors.black, textStrokeColor: Colors.transparent, )), ], ), onPressed: () { context.vRouter.to("/mesaici/hareketler/kart-hareketleri/${gun.id}"); }, ), ); }, ), secondChild: Padding( padding: const EdgeInsets.only(top: 30.0), child: Stack( children: [ Card( child: Container( height: 100.0, ), ), const FractionalTranslation( translation: Offset(0.0, -0.4), child: Align( alignment: FractionalOffset(0.5, 0.0), child: CircleAvatar( // backgroundColor: Colors.redAccent.shade200, radius: 25.0, child: Text( "πŸ“±", style: TextStyle(fontSize: 24), ), ), ), ), Padding( padding: const EdgeInsets.only(top: 48), child: Align( alignment: const FractionalOffset(0.5, 0.5), child: Text( "Herhangi Bir Γ‡alışma KaydΔ±nΔ±z BulunamadΔ±", style: TextStyle(fontSize: 16, fontWeight: FontWeight.w300, color: Colors.blueAccent.shade400), textAlign: TextAlign.center, ), ), ), ], ), ), ), ); } return const CircularProgressIndicator(); }, ), ], ); }, ), ), ), /** */ /** */ const Divider(), Obx( () { FikoYTService.servisMesaici.aktifAy.value; return FutureBuilder( future: FikoYTService.servisMesaici.aylikOzet?.aktifAyhesapla(), builder: (context, snapshot) => Column( children: [ Row( children: [ Text( "Normal Mesai", style: TextStyle( fontWeight: FontWeight.bold, color: Theme.of(context).extension()?.textColor, ), ), const Spacer(), AnimatedFikoYTButton1( text: "${snapshot.data?.normalCalismaSuresi.insanize ?? 'Yok'}", tema: Theme.of(context).extension()?.copyWith( textAlign: TextAlign.right, textColor: Theme.of(context).extension()?.textColor, ), // onPressed: () { // print(snapshot.error.toString()); // }, ), ], ), Row( children: [ Text( "Fazla Mesai", style: TextStyle( fontWeight: FontWeight.bold, color: Theme.of(context).extension()?.textColor, ), ), const Spacer(), AnimatedFikoYTButton1( text: "${snapshot.data?.fazlaMesaiSuresi.insanize ?? 'Yok'}", tema: Theme.of(context).extension()?.copyWith( textAlign: TextAlign.right, textColor: Theme.of(context).extension()?.textColor, ), ), ], ), Row( children: [ Text( "Toplam Saat", style: TextStyle( fontWeight: FontWeight.bold, color: Theme.of(context).extension()?.textColor, ), ), const Spacer(), AnimatedFikoYTButton1( text: "${snapshot.data?.toplamCalisilanSure.insanize ?? 'Yok'}", tema: Theme.of(context).extension()?.copyWith( textAlign: TextAlign.right, textColor: Theme.of(context).extension()?.textColor, ), ), ], ), ], ), ); }, ), ], ), ), ], headerExpandedHeight: 315, // stretchMaxHeight: 100, fullyStretchable: false, backgroundColor: Theme.of(context).extension()?.backgroundColor, //Colors.grey.shade200, centerTitle: true, alwaysShowLeadingAndAction: true, appBarColor: Theme.of(context).extension()?.appBarColor, alwaysShowTitle: true, curvedBodyRadius: 0, onStretchTrigger: () async { context.vRouter.to("/"); }, ); } }