import 'package:fikoyt_finans/core/Extensions/fiko_double_ext.dart'; import 'package:fikoyt_finans/core/widgets/fiko_ui/fiko_button/fiko_button.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../model/calisma_kayit/calisma_kayit.dart'; class KumultatifSatir extends StatelessWidget { const KumultatifSatir({super.key, required this.kayit}); final Rx? kayit; @override Widget build(BuildContext context) { return Container( alignment: Alignment.centerLeft, padding: const EdgeInsets.all(3), margin: const EdgeInsets.symmetric(vertical: 5), decoration: BoxDecoration( border: Border.all(color: Colors.grey.shade300), borderRadius: BorderRadius.circular(15), color: Colors.grey.shade100, ), child: Row( children: [ // FutureBuilder( // future: kayit?.value?.kumulatifMatrahHesapla(), // builder: (context, snapshot) => Expanded( // child: AnimatedNumberFikoButton1( // text: snapshot.data ?? 0.0, // textBuilder: (tweenValue) => "Kümülatif Matrahınız ${tweenValue.toParaBirimi()}'dir", // textStrokeColor: Colors.transparent, // textColor: Colors.grey.shade700, // textAlign: TextAlign.start, // textSize: 11, // onPressed: () async { // // print(await kayit?.value?.kumulatifMatrahHesapla()); // }, // ), // ), // ), // FikoButton1( // text: "Kümülatif Matrahınız 0.00 TL'dir", // textSize: 10, // textAlign: TextAlign.start, // edgePadding: const EdgeInsets.symmetric(vertical: 2.0), // textStrokeWidth: 0, // textColor: Colors.black87, // textStrokeColor: Colors.transparent, // onPressed: () async { // print(await kayit?.value?.kumulatifMatrah()); // }, // ), Expanded( child: Obx( () => AnimatedNumberFikoButton1( text: kayit?.value?.kumulatifMatrahGuncelleSync(), textBuilder: (tweenValue) => "Kümülatif Matrahınız ${tweenValue.toParaBirimi()}'dir", textStrokeColor: Colors.transparent, textColor: Colors.grey.shade700, textAlign: TextAlign.start, textSize: 11, onPressed: () async { // print(await kayit?.value?.kumulatifMatrahHesapla()); }, ), ), ), Obx( () => AnimatedNumberFikoButton1( text: 100 - (((kayit?.value?.odenecekUcret ?? 0.0) / (kayit?.value?.brutToplam ?? 0.0)) * 100), textBuilder: (tweenValue) => "(%${tweenValue.toPrecision(2).toStringAsFixed(3)}) 🟡", textStrokeColor: Colors.transparent, textColor: Colors.grey.shade700, textAlign: TextAlign.start, textSize: 11, onPressed: () async { // print(await kayit?.value?.kumulatifMatrahHesapla()); }, ), ), ], ), ); } }