// ignore_for_file: library_private_types_in_public_api import 'package:fikoyt_mesaici/apps/mesaici/pages/raporlar/aylik_grafik.dart'; import 'package:fikoyt_mesaici/apps/mesaici/servisler/fikoyt.mesaici.service.dart'; import 'package:fikoyt_mesaici/apps/mesaici/widgets/ozet_aylik/hesaplamalar.dart'; import 'package:fikoyt_mesaici/apps/mesaici/widgets/ozet_aylik/ozet_aylik.dart'; import 'package:fikoyt_mesaici/core/Extensions/fiko_tarih.dart'; import 'package:fikoyt_ui/fikoyt_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.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 PageMesaiciRaporlarLogic extends GetxController { BasePageLogic basePageLogic = Get.put(BasePageLogic()); final FikoYTMesaiciService servisMesaici = Get.put(FikoYTMesaiciService()); } class PageMesaiciRaporlar extends StatefulWidget { const PageMesaiciRaporlar({super.key}); @override _PageMesaiciRaporlarState createState() => _PageMesaiciRaporlarState(); } class _PageMesaiciRaporlarState extends State { PageMesaiciRaporlarLogic logic = Get.put(PageMesaiciRaporlarLogic()); //---> @override Widget build(BuildContext context) { SchedulerBinding.instance.addPostFrameCallback((_) { logic.basePageLogic.subTitle.value = "📝 Raporlar"; }); ScreenSizeTypes screenType = FikoYTElastic.getScreenSizeType(context); [ // ScreenSizeTypes.small, ScreenSizeTypes.mini, ScreenSizeTypes.extraMini ].contains(screenType); return FikoYTSliverApp( 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, ), ), ), ), ], ), body: [ Row( children: [ FikoYTButton( text: "<", tema: Theme.of(context).extension()?.copyWith( fontSize: 16, edgePadding: const EdgeInsets.symmetric(horizontal: 5), ), onPressed: () { logic.servisMesaici.oncekiAy(); logic.servisMesaici.aktifAy.refresh(); }, ), Expanded( child: Obx( () => AnimatedFikoYTButton1( text: (DateTime.now().formatla("MMMM yyyy") == logic.servisMesaici.aktifAy.value.formatla("MMMM yyyy") ? "👉🏻" : "") + logic.servisMesaici.aktifAy.value.formatla('MMMM yyyy'), tema: Theme.of(context).extension()?.copyWith( fontSize: 16, ), onPressed: () { logic.servisMesaici.simdikiAy(); logic.servisMesaici.aktifAy.refresh(); }, ), // AnimatedSwitcher( // duration: const Duration(milliseconds: 750), // transitionBuilder: (Widget child, Animation animation) { // return FadeTransition(opacity: animation, child: child); // }, // child: FikoYTButton( // key: ValueKey(logic.servisMesaici.aktifAy.value.formatla('MMMM yyyy')), // text: (DateTime.now().formatla("MMMM yyyy") == logic.servisMesaici.aktifAy.value.formatla("MMMM yyyy") ? "👉🏻" : "") + logic.servisMesaici.aktifAy.value.formatla('MMMM yyyy'), // textSize: 16, // onPressed: () { // logic.servisMesaici.simdikiAy(); // logic.servisMesaici.aktifAy.refresh(); // }, // ), // ), ), ), FikoYTButton( text: ">", tema: Theme.of(context).extension()?.copyWith( fontSize: 16, edgePadding: const EdgeInsets.symmetric(horizontal: 5), ), onPressed: () { logic.servisMesaici.sonrakiAy(); logic.servisMesaici.aktifAy.refresh(); }, ), ], ), /** */ 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=raporlar", ), ], ), /** */ Container( margin: const EdgeInsets.all(10), child: Column( children: [ /** */ OzetAylik( hesaplanabilir: false, ), /** */ const AylikGrafik(), /** */ const OzetAylikHesaplamalarWidget( key: ValueKey("Hesaplamalar"), ), ], ), ), ], headerExpandedHeight: 315, // stretchMaxHeight: 100, fullyStretchable: false, backgroundColor: Theme.of(context).extension()?.arkaPlanRengi, //Colors.grey.shade200, // bodyColor: Colors.white, centerTitle: true, sliverAltKisim: const SizedBox.shrink(), alwaysShowLeadingAndAction: true, appBarColor: Theme.of(context).extension()?.appBarColor, alwaysShowTitle: true, curvedBodyRadius: 0, onStretchTrigger: () async { context.vRouter.to("/"); }, ); } @override void dispose() { Get.delete(); super.dispose(); } } /** * */