import 'package:fikoyt_akcali_v1/apps/finans/core/models/finans.model.dart'; import 'package:fikoyt_akcali_v1/apps/finans/core/services/finans.servis.dart'; import 'package:fikoyt_akcali_v1/apps/finans/uye/hesaplar/_hesaplar-logic.dart'; import 'package:fikoyt_akcali_v1/core/widgets/header_widget/header_widget.dart'; import 'package:fikoyt_akcali_v1/core/widgets/uygulama_baslik/uygulama_baslik.dart'; import 'package:fikoyt_ui/fikoyt_ui.dart'; import 'package:fikoyt_ui/ui/fikoyt_card.dart'; import 'package:fikoyt_ui/ui/yazi_kutulari/fikoyt_button_kutu.dart'; import 'package:fikoyt_ui/ui/yazi_kutulari/yazi_kutulari.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:isar/isar.dart'; class SayfaHesapTurleriService extends GetxService { Rx kayit = Rx(HesapTuru()); Rx kayitEkleGoster = Rx(false); FinansServis? finansServis = FikoYTCoreService.servisler.getServis(); Isar? isar = FikoYTCoreService.servisler.getServis()?.isar; kayitKontrol() { kayit.value?.ismi != ""; } kaydet({required HesapTuru kyt}) { isar?.writeTxn(() async { if (kyt.aciklama == "") { kyt.aciklama = null; } kyt.sahibi.value = finansServis?.aktifKullanici.value; await isar?.hesapTurus.put(kyt); await kyt.sahibi.save(); await kyt.anaParaBirimi.save(); kayit.value = HesapTuru(); kayitEkleGoster.value = false; kayitEkleGoster.refresh(); kayit.refresh(); }); } sil({required HesapTuru kyt}) { isar?.writeTxn(() async { isar?.hesapTurus.delete(kyt.id); kayit.value = HesapTuru(); kayitEkleGoster.value = false; kayitEkleGoster.refresh(); kayit.refresh(); }); } Future> listeAl(int page, int limit) async { return await isar?.hesapTurus .where() .filter() .sahibi((q) => q.idEqualTo(finansServis?.aktifKullanici.value?.id ?? -1)) .sortByIsmi() .offset(page * limit) .limit(limit) .findAll() ?? []; } List listeAlSync(int page, int limit) { return isar?.hesapTurus .where() .filter() .sahibi((q) => q.idEqualTo(finansServis?.aktifKullanici.value?.id ?? -1)) .offset(page * limit) .limit(limit) .findAllSync() ?? []; } } class SayfaHesapTurleri extends StatefulWidget { const SayfaHesapTurleri({super.key}); @override State createState() => _SayfaHesapTurleriState(); } class _SayfaHesapTurleriState extends State { FinansServis? finansServis = FikoYTCoreService.servisler.getServis(); SayfaHesapTurleriService? logic; HesaplarService? logicHesaplar; @override void initState() { finansServis = FikoYTCoreService.servisler.getServis(); logic = Get.put(SayfaHesapTurleriService()); logicHesaplar = Get.put(HesaplarService()); SchedulerBinding.instance.addPostFrameCallback((_) { finansServis?.altBaslik.value = "Hesap Türleri"; }); super.initState(); } @override void dispose() { Get.delete(); super.dispose(); } @override Widget build(BuildContext context) { return FikoYTSliverApp( leading: UygulamaBaslikSol(), title: UygulamaBaslikOrta(), actions: [UygulamaBaslikSag()], drawer: finansServis?.solMenu.value, backgroundColor: Theme.of(context).extension()?.backgroundColor, appBarColor: Theme.of(context).extension()?.appBarColor?.withAlpha(230), headerExpandedHeight: 230, // stretchMaxHeight: 100, fullyStretchable: true, centerTitle: true, alwaysShowLeadingAndAction: true, alwaysShowTitle: true, curvedBodyRadius: 0, // onStretchTrigger: () async { // context.vRouter.to("/"); // }, /// headerWidget: Obx( () => HeaderWidget( ovalResimUrl: finansServis?.aktifKullanici.value?.profilResmiUrl ?? "🏠", baslik: finansServis?.aktifKullanici.value?.ismi, baslikTheme: Theme.of(context).extension()?.copyWith( textColor: Theme.of(context).extension()?.secondaryTextColor, fontWeight: FontWeight.bold, fontSize: 16, ), altBaslik: "Sisteminizdeki Hesap Türleri", altBaslikTheme: Theme.of(context).extension()?.copyWith( textColor: Theme.of(context).extension()?.tertiaryTextColor, fontWeight: FontWeight.normal, fontSize: 12, ), ovalResimTiklandi: finansServis?.profilResmiDegistir, ), ), /// golgeGoster: false, bodyColor: Colors.transparent, body: [ SizedBox(height: 15), ///$ Container( margin: EdgeInsets.symmetric(vertical: 10), constraints: BoxConstraints(maxWidth: 300), child: Column( children: [ Row( children: [ FikoYTButton(text: "Hesap Türleri", tema: FikoYTButtonTheme(fontSize: 12)), Spacer(), FikoYTButton(text: "🧬", onPressed: () {}), ], ), Divider(height: 4), Obx(() { logic?.kayit.value; return AnimatedSwitcher( duration: const Duration(milliseconds: 500), layoutBuilder: (Widget? currentChild, List previousChildren) { return Stack( alignment: Alignment.topCenter, children: [...previousChildren, if (currentChild != null) currentChild], ); }, transitionBuilder: (Widget child, Animation animation) { return FadeTransition( opacity: animation, child: SizeTransition(sizeFactor: animation, axisAlignment: 1.0, child: Center(child: child)), ); }, // visible: logic.aktifHareket.value != null ? logic.aktifHareket.value!.altKartlar.isEmpty : false, child: (finansServis?.isar?.hesapTurus.where().countSync() ?? 0) <= 0 ? Container( // width: double.infinity, padding: const EdgeInsets.only(bottom: 20, top: 20, left: 5, right: 5), margin: EdgeInsets.all(10), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), color: Colors.transparent, border: Border.all(color: Colors.grey.shade400), boxShadow: [ BoxShadow(color: Colors.teal.withOpacity(0.15), spreadRadius: -15.0, blurRadius: 12.0), const BoxShadow(color: Colors.transparent, spreadRadius: -5.0, blurRadius: 12.0), ], ), child: Column( children: [ const Row( mainAxisAlignment: MainAxisAlignment.center, children: [Text("🏷", style: TextStyle(fontSize: 36))], ), FikoYTButton( text: "Hesap Türü Bulunamadı", tema: Theme.of(context).extension()?.copyWith( textColor: Theme.of(context).extension()?.errorTextColor, textStrokeColor: Colors.white, fontSize: 16, ), ), /** */ paraBirimiEkleBolumu(context), ], ), ) : Builder( builder: (context) { List snapshot = finansServis?.isar?.hesapTurus.where().findAllSync() ?? []; return Column( children: [ snapshot.isNotEmpty ? ListView.builder( shrinkWrap: true, physics: NeverScrollableScrollPhysics(), itemCount: finansServis?.isar?.hesapTurus.where().countSync() ?? 0, itemBuilder: (context, index) { return hesapTuruItem(snapshot, index, context); // FikoYTButton( // text: // "${snapshot[index].kod} ${snapshot[index].ismi} ${snapshot[index].sembol} -> ${snapshot[index].oran}", // ); }, ) : SizedBox.shrink(), /** */ paraBirimiEkleBolumu(context), ], ); }, ), ); }), ], ), ), ], ); } Container hesapTuruItem(List snapshot, int index, BuildContext context) { return Container( padding: EdgeInsets.all(3), child: ListTileTheme( contentPadding: EdgeInsets.zero, dense: true, horizontalTitleGap: 0, minVerticalPadding: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), child: ListTile( leading: FikoYTButton(text: "${snapshot[index].emoji}"), title: FikoYTButton(text: "${snapshot[index].ismi}"), trailing: FikoYTButton(text: snapshot[index].anaParaBirimi.value?.kod ?? ''), tileColor: Theme.of(context).extension()?.cardBackgroundColor, isThreeLine: false, onTap: () { dialogHesapTuruEkleGoster(context, kyt: snapshot[index].obs); }, subtitle: FikoYTButton( text: snapshot[index].aciklama ?? 'Açıklama Yok', tema: FikoYTButtonTheme(fontWeight: FontWeight.w200, fontSize: 12), ), ), ), ); } Future dialogHesapTuruEkleGoster(BuildContext context, {Rx? kyt}) { return showGeneralDialog( context: context, barrierDismissible: true, barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, transitionDuration: Duration(milliseconds: ((finansServis?.openContainerDuration.inMilliseconds ?? 0)).toInt()), pageBuilder: (context, animation, secondaryAnimation) { return Center( child: Material( color: Colors.transparent, child: SingleChildScrollView( child: Column( mainAxisSize: MainAxisSize.min, // Küçük diyalog olacak children: [formHesapTuruEkle(context, kyt: kyt)], ), // İçeriği buraya koyuyoruz ), ), ); }, transitionBuilder: (context, animation, secondaryAnimation, child) { return ScaleTransition( scale: Tween(begin: 0.7, end: 1.0).animate(CurvedAnimation(parent: animation, curve: Curves.easeOutBack)), child: FadeTransition(opacity: animation, child: child), ); }, ); // return showDialog( // context: context, // builder: // (context) => // AlertDialog(content: formHesapTuruEkle(context, kyt: kyt), backgroundColor: Colors.transparent, scrollable: true), // ); } paraBirimiEkleBolumu(BuildContext context, {Rx? kyt}) { return // Obx( // () => AnimatedSwitcher( duration: const Duration(milliseconds: 500), layoutBuilder: (Widget? currentChild, List previousChildren) { return Stack( alignment: Alignment.topCenter, children: [...previousChildren, if (currentChild != null) currentChild], ); }, transitionBuilder: (Widget child, Animation animation) { return FadeTransition( opacity: animation, child: SizeTransition(sizeFactor: animation, axisAlignment: 1.0, child: Center(child: child)), ); }, // visible: logic.aktifHareket.value != null ? logic.aktifHareket.value!.altKartlar.isEmpty : false, child: logic!.kayitEkleGoster.value ? formHesapTuruEkle(context, kyt: kyt) : Center( key: ValueKey("asdasdadqwasa"), child: FikoYTButton( text: 'Yeni Hesap Türü', tema: Theme.of(context).extension()?.copyWith( textAlign: TextAlign.center, textStrokeColor: Colors.transparent, textColor: Theme.of(context).extension()?.infoTextColor, // textShadow: [], edgePadding: EdgeInsets.symmetric(horizontal: 15), ), onPressed: () { dialogHesapTuruEkleGoster(context); }, ), ), // ), ); } FikoYTCard formHesapTuruEkle(BuildContext context, {Rx? kyt}) { Rx kayit; if (kyt?.value == null) { kayit = Rx(HesapTuru()); } else { kayit = Rx(kyt!.value!); } return FikoYTCard( key: ValueKey("HesapTuruEkleDialog"), theme: (Theme.of(context).extension() ?? FikoYTCardTheme()).copyWith( boxConstraints: BoxConstraints(maxWidth: 300), ), children: [ Center(child: Text('🏷', style: TextStyle(fontSize: 54))), Center( child: FikoYTButton( text: kyt?.value?.id == null ? 'Yeni Hesap Türü' : 'Hesap Türü Güncelle', tema: Theme.of(context).extension()?.copyWith( textAlign: TextAlign.center, textStrokeColor: Colors.transparent, textColor: Theme.of(context).extension()?.infoTextColor, // textShadow: Theme.of(context).extension()?.textShadow, ), ), ), Divider(height: 4), Obx( () => Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, spacing: 5, children: [ FikoYaziKutusu( baslik: "Hesap Türü İsmi", simgeSol: const Text("✏️", style: TextStyle(fontSize: 14)), yaziBoyutu: 12.0, radius: 5.0, degeri: kayit.value.ismi, degisti: (value) { kayit.value.ismi = value; }, ), FikoYaziKutusu( baslik: "Sembol", simgeSol: const Text("⭐", style: TextStyle(fontSize: 14)), yaziBoyutu: 12.0, radius: 5.0, degeri: kayit.value.emoji, degisti: (value) { kayit.value.emoji = value; }, ), Obx( () => FikoYTButtonKutu( baslik: "Ana Para Birimi", simgeSol: "⛃", sonEk: Text(kayit.value.anaParaBirimi.value?.sembol ?? ""), // yaziBoyutu: 12.0, radius: 5.0, deger: kayit.value.anaParaBirimi.value?.ismi, onPressed: () { FikoYTCoreService.dialogGoster(context, formParaBirimiListesi(context), null).then((value) { kayit.value.anaParaBirimi.value = value; kayit.refresh(); }); }, ), ), FikoAciklamaKutusu( baslik: "Açıklama", yaziBoyutu: 12.0, radius: 5.0, degeri: kayit.value.aciklama, degisti: (value) { kayit.value.aciklama = value; }, ), /// ExpansionTile( initiallyExpanded: true, title: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ const Expanded(child: Divider(indent: 0.0, endIndent: 0.0, thickness: 1)), FikoYTButton( text: '🧩 Hesap Özellikleri', tema: Theme.of(context).extension()?.copyWith( textStrokeColor: Colors.transparent, textColor: Theme.of(context).extension()?.textColor?.withAlpha(150), ), ), const Expanded(child: Divider(indent: 0.0, endIndent: 0.0, thickness: 1)), ], ), tilePadding: EdgeInsets.zero, childrenPadding: EdgeInsets.only(left: 0), dense: true, minTileHeight: 0, shape: const Border(), children: [ Container( padding: EdgeInsets.all(0), child: Column( children: [ ListTileTheme( contentPadding: EdgeInsets.zero, dense: true, horizontalTitleGap: 0, minVerticalPadding: 0, child: ListTile( leading: Text('💴', style: TextStyle(fontSize: 16)), title: FikoYTButton( text: "Banka Desteği", tema: FikoYTButtonTheme( textColor: Theme.of(context).extension()?.infoTextColor, fontSize: 14, textShadow: [], ), ), subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ FikoYTButton( text: "Bu Türde Hesap Oluştururken Eğer Banka Desteği Aktif İse Hesabınız; Banka Hesaplarına Uygun Özelliklerle Donatılacaktır.", tema: FikoYTButtonTheme(fontWeight: FontWeight.normal, fontSize: 10, textShadow: []), ), Align( alignment: Alignment.centerRight, child: SizedBox( height: 25, child: FittedBox( fit: BoxFit.fill, child: Obx( () => Switch( value: kayit.value.bankaDestegi ?? false, onChanged: (value) { kayit.value.bankaDestegi = value; kayit.refresh(); }, ), ), ), ), ), ], ), dense: true, isThreeLine: false, onTap: () { kayit.value.bankaDestegi = !(kayit.value.bankaDestegi ?? false); kayit.refresh(); // context.vRouter.to("/uye/hesaplar/nakit-hesap-ekle"); }, ), ), Divider(height: 1, thickness: 1), ], ), ), /// Container( padding: EdgeInsets.all(0), child: Column( children: [ ListTileTheme( contentPadding: EdgeInsets.zero, dense: true, horizontalTitleGap: 0, minVerticalPadding: 0, child: ListTile( leading: Text('💯', style: TextStyle(fontSize: 16)), title: FikoYTButton( text: "Faiz Desteği", tema: FikoYTButtonTheme( textColor: Theme.of(context).extension()?.infoTextColor, fontSize: 14, textShadow: [], ), ), subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ FikoYTButton( text: "Bu Seçenek Aktif İse Hesabınız, Faiz Sistemine Uygun Özelliklerle Donatılacaktır", tema: FikoYTButtonTheme(fontWeight: FontWeight.normal, fontSize: 10, textShadow: []), ), Align( alignment: Alignment.centerRight, child: SizedBox( height: 25, child: FittedBox( fit: BoxFit.fill, child: Obx( () => Switch( value: kayit.value.faizDestegi ?? false, onChanged: (value) { kayit.value.faizDestegi = value; kayit.refresh(); }, ), ), ), ), ), ], ), dense: true, isThreeLine: false, onTap: () { kayit.value.faizDestegi = !(kayit.value.faizDestegi ?? false); kayit.refresh(); // context.vRouter.to("/uye/hesaplar/nakit-hesap-ekle"); }, ), ), Divider(height: 1, thickness: 1), ], ), ), /// Container( padding: EdgeInsets.all(0), child: Column( children: [ ListTileTheme( contentPadding: EdgeInsets.zero, dense: true, horizontalTitleGap: 0, minVerticalPadding: 0, child: ListTile( leading: Text('💸', style: TextStyle(fontSize: 16)), title: FikoYTButton( text: "Kredi Desteği", tema: FikoYTButtonTheme( textColor: Theme.of(context).extension()?.infoTextColor, fontSize: 14, textShadow: [], ), ), subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ FikoYTButton( text: "Bu Seçenek Aktif İse Hesabınız, Çektiğiniz Kredilere Uygun Hesap Özellikleriyle Donatılacaktır", tema: FikoYTButtonTheme(fontWeight: FontWeight.normal, fontSize: 10, textShadow: []), ), Align( alignment: Alignment.centerRight, child: SizedBox( height: 25, child: FittedBox( fit: BoxFit.fill, child: Obx( () => Switch( value: kayit.value.krediDestegi ?? false, onChanged: (value) { kayit.value.krediDestegi = value; kayit.refresh(); }, ), ), ), ), ), ], ), dense: true, isThreeLine: false, onTap: () { kayit.value.krediDestegi = !(kayit.value.krediDestegi ?? false); kayit.refresh(); // context.vRouter.to("/uye/hesaplar/nakit-hesap-ekle"); }, ), ), Divider(height: 1, thickness: 1), ], ), ), /// Container( padding: EdgeInsets.all(0), child: Column( children: [ ListTileTheme( contentPadding: EdgeInsets.zero, dense: true, horizontalTitleGap: 0, minVerticalPadding: 0, child: ListTile( leading: Text('☘', style: TextStyle(fontSize: 16)), title: FikoYTButton( text: "Yatırım Desteği", tema: FikoYTButtonTheme( textColor: Theme.of(context).extension()?.infoTextColor, fontSize: 14, textShadow: [], ), ), subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ FikoYTButton( text: "Bu Seçenek Aktif İse Hesabınız, Yatırımlarınız İle İlgili Lazım Olabilecek Bir Çok Özellikle Donatılacaktır.", tema: FikoYTButtonTheme(fontWeight: FontWeight.normal, fontSize: 10, textShadow: []), ), Align( alignment: Alignment.centerRight, child: SizedBox( height: 25, child: FittedBox( fit: BoxFit.fill, child: Obx( () => Switch( value: kayit.value.krediDestegi ?? false, onChanged: (value) { kayit.value.krediDestegi = value; kayit.refresh(); }, ), ), ), ), ), ], ), dense: true, isThreeLine: false, onTap: () { kayit.value.krediDestegi = !(kayit.value.krediDestegi ?? false); kayit.refresh(); // context.vRouter.to("/uye/hesaplar/nakit-hesap-ekle"); }, ), ), Divider(height: 1, thickness: 1), ], ), ), ], ), /// Row( children: [ FikoYTButton( text: "❌ Kapat", tema: FikoYTButtonTheme( // textColor: Colors.white, backgroundColor: Colors.transparent, // fontWeight: FontWeight.w700, edgePadding: EdgeInsets.all(3), borderColor: Colors.red, elevation: 3, fontSize: 12, ), onPressed: () async { logic?.kayitEkleGoster.value = false; logic?.kayitEkleGoster.refresh(); context.vRouter.pop(); }, ), Spacer(), if (kyt?.value != null) FikoYTIconButton( text: "Sil", icon: Icons.delete, tema: FikoYTButtonTheme( // textColor: Colors.white, backgroundColor: Colors.transparent, // fontWeight: FontWeight.w700, edgePadding: EdgeInsets.all(3), borderColor: Colors.blueAccent, elevation: 3, fontSize: 12, ), onPressed: () async { AwesomeDialog( context: context, dialogType: DialogType.question, animType: AnimType.scale, headerAnimationLoop: false, title: 'Silme Onayı', titleTextStyle: TextStyle( color: Theme.of(context).extension()?.infoTextColor, fontSize: 16, ), desc: '${kyt!.value?.ismi ?? ""} Hesap Türü Silinecek. Onaylıyormusunuz?', btnCancelOnPress: () { // context.vRouter.pop(); }, btnCancelColor: Colors.green, btnCancelText: "İptal", btnOkOnPress: () { logic?.sil(kyt: kyt.value!); kayit.refresh(); /// Başarılı toastification.show( context: FikoYTCoreService.navigatorKey.currentContext, type: ToastificationType.warning, style: ToastificationStyle.fillColored, // title: Text("FikoYT Sistem"), description: Text("Hesap Türü Silindi."), alignment: Alignment.topRight, autoCloseDuration: const Duration(seconds: 4), borderRadius: BorderRadius.circular(4.0), boxShadow: lowModeShadow, showProgressBar: false, dragToClose: true, applyBlurEffect: true, ); context.vRouter.pop(); }, btnOkColor: Colors.red, btnOkText: "Sil", ).show(); }, ), FikoYTIconButton( text: (kyt?.value != null) ? "Güncelle" : "Ekle", icon: (kyt?.value != null) ? Icons.update : Icons.add, tema: FikoYTButtonTheme( // textColor: Colors.white, backgroundColor: Colors.transparent, // fontWeight: FontWeight.w700, edgePadding: EdgeInsets.all(3), borderColor: Colors.blueAccent, elevation: 3, fontSize: 12, ), onPressed: () async { if (kayit.value.bosMu) { /// Boş toastification.show( context: FikoYTCoreService.navigatorKey.currentContext, type: ToastificationType.error, style: ToastificationStyle.fillColored, // title: Text("FikoYT Sistem"), description: Text("Tüm Boş Alanları Doldurun."), alignment: Alignment.topRight, autoCloseDuration: const Duration(seconds: 4), borderRadius: BorderRadius.circular(4.0), boxShadow: lowModeShadow, showProgressBar: false, dragToClose: true, applyBlurEffect: true, ); return; } logic?.kaydet(kyt: kayit.value); /// Başarılı toastification.show( context: FikoYTCoreService.navigatorKey.currentContext, type: ToastificationType.success, style: ToastificationStyle.fillColored, // title: Text("FikoYT Sistem"), description: Text("Para Birimi Tanımlandı."), alignment: Alignment.topRight, autoCloseDuration: const Duration(seconds: 4), borderRadius: BorderRadius.circular(4.0), boxShadow: lowModeShadow, showProgressBar: false, dragToClose: true, applyBlurEffect: true, ); context.vRouter.pop(); }, ), ], ), ], ), ), ), ], ); } FikoYTCard formParaBirimiListesi(BuildContext context) { return FikoYTCard( key: ValueKey("ParaBirimiListesiDialog"), theme: (Theme.of(context).extension() ?? FikoYTCardTheme()).copyWith( boxConstraints: BoxConstraints(maxWidth: 300), arkaPlanRengi: Theme.of(context).extension()?.backgroundColor, ), children: [ Center(child: Text('💸', style: TextStyle(fontSize: 54))), Center( child: FikoYTButton( text: 'Para Birimi Seç', tema: Theme.of(context).extension()?.copyWith( textAlign: TextAlign.center, textStrokeColor: Colors.transparent, textColor: Theme.of(context).extension()?.infoTextColor, // textShadow: Theme.of(context).extension()?.textShadow, ), ), ), Divider(height: 4), Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, spacing: 5, children: [ FikoYaziKutusu( baslik: "Arama Yap", simgeSol: const Text("✏️", style: TextStyle(fontSize: 14)), yaziBoyutu: 12.0, radius: 5.0, degeri: "", degisti: (value) {}, ), Divider(height: 4), /// AnimatedSwitcher( duration: const Duration(milliseconds: 500), layoutBuilder: (Widget? currentChild, List previousChildren) { return Stack( alignment: Alignment.topCenter, children: [...previousChildren, if (currentChild != null) currentChild], ); }, transitionBuilder: (Widget child, Animation animation) { return FadeTransition( opacity: animation, child: SizeTransition(sizeFactor: animation, axisAlignment: 1.0, child: Center(child: child)), ); }, // visible: logic.aktifHareket.value != null ? logic.aktifHareket.value!.altKartlar.isEmpty : false, child: (logicHesaplar?.logicParaBirimi?.listeAlSync(0, 1000) ?? []).isEmpty ? Container( // width: double.infinity, padding: const EdgeInsets.only(bottom: 20, top: 20, left: 5, right: 5), margin: EdgeInsets.all(10), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), color: Colors.transparent, border: Border.all(color: Colors.grey.shade400), boxShadow: [ BoxShadow(color: Colors.teal.withOpacity(0.15), spreadRadius: -15.0, blurRadius: 12.0), const BoxShadow(color: Colors.transparent, spreadRadius: -5.0, blurRadius: 12.0), ], ), child: Column( children: [ const Row( mainAxisAlignment: MainAxisAlignment.center, children: [Text("💸", style: TextStyle(fontSize: 36))], ), FikoYTButton( text: "Para Birimi Yok", tema: Theme.of(context).extension()?.copyWith( textColor: Theme.of(context).extension()?.errorTextColor, textStrokeColor: Colors.white, fontSize: 16, ), ), /** */ ], ), ) : FutureBuilder( future: logicHesaplar?.logicParaBirimi?.listeAl(0, 1000), builder: (context, snapshot) { return Column( children: [ if (snapshot.data != null) if (snapshot.data!.isNotEmpty) Material( color: Colors.transparent, child: ListView.builder( shrinkWrap: true, physics: NeverScrollableScrollPhysics(), itemCount: snapshot.data?.length, itemBuilder: (context, index) { return paraBirimiItem(snapshot.data![index], index, context); // FikoYTButton( // text: // "${snapshot[index].kod} ${snapshot[index].ismi} ${snapshot[index].sembol} -> ${snapshot[index].oran}", // ); }, ), ), /** */ ], ); }, ), ), /// Row( children: [ FikoYTButton( text: "❌ Kapat", tema: FikoYTButtonTheme( // textColor: Colors.white, backgroundColor: Colors.transparent, // fontWeight: FontWeight.w700, edgePadding: EdgeInsets.all(3), borderColor: Colors.red, elevation: 3, fontSize: 12, ), onPressed: () async { context.vRouter.pop(); }, ), Spacer(), ], ), ], ), ), ], ); } Container paraBirimiItem(ParaBirimi prbrm, int index, BuildContext context) { return Container( padding: EdgeInsets.all(3), child: ListTileTheme( contentPadding: EdgeInsets.zero, dense: true, horizontalTitleGap: 0, minVerticalPadding: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)), child: ListTile( leading: FikoYTButton(text: "${prbrm.sembol}"), title: FikoYTButton(text: "${prbrm.ismi} ${prbrm.kod}"), trailing: FikoYTButton(text: "${prbrm.oran}"), tileColor: Theme.of(context).extension()?.cardBackgroundColor, isThreeLine: false, onTap: () { Navigator.of(context).pop(prbrm); }, subtitle: FikoYTButton( text: prbrm.aciklama ?? 'Açıklama Yok', tema: FikoYTButtonTheme(fontWeight: FontWeight.w200, fontSize: 12), ), ), ), ); } }