import 'package:fikoyt_mesaici/apps/mesaici/model/model_hareketler.dart'; import 'package:fikoyt_mesaici/core/Extensions/fiko_double_ext.dart'; import 'package:fikoyt_ui/fikoyt_ui.dart'; import 'package:flutter/material.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?.calismaKarti?.kumulatifMatrahHesapla(), // builder: (context, snapshot) => Expanded( // child: AnimatedNumberFikoYTButton1( // 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()); // }, // ), // ), // ), Expanded( child: Obx( () => AnimatedNumberFikoYTButton1( text: kayit?.value?.calismaKarti?.kumulatifMatrahGuncelleSync(), textBuilder: (tweenValue) => "Kümülatif Matrahınız ${tweenValue?.toParaBirimi()}'dir", tema: Theme.of(context).extension()?.copyWith( textStrokeColor: Colors.transparent, textColor: Colors.grey.shade700, textAlign: TextAlign.start, fontSize: 11, ), onPressed: () async { // print(await kayit?.value?.kumulatifMatrahHesapla()); }, ), ), ), Obx( () => AnimatedNumberFikoYTButton1( text: 100 - (((kayit?.value?.calismaKarti?.odenecekUcret ?? 0.0) / (kayit?.value?.calismaKarti?.brutToplam ?? 0.0)) * 100), textBuilder: (tweenValue) => "(%${tweenValue?.toPrecision(2).toStringAsFixed(3)}) 🟡", tema: Theme.of(context).extension()?.copyWith( textStrokeColor: Colors.transparent, textColor: Colors.grey.shade700, textAlign: TextAlign.start, fontSize: 11, ), onPressed: () async { kayit?.refresh(); // print(await kayit?.value?.kumulatifMatrahHesapla()); }, ), ), ], ), ); } }