import 'package:fikoyt_mesaici/core/Extensions/fiko_double_ext.dart'; import 'package:fikoyt_mesaici/core/widgets/fiko_ui/fiko_button/fiko_button.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:intl/intl.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?.kumulatifMatrah(), builder: (context, snapshot) => 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?.kumulatifMatrah()); }, ), ), // 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()); // }, // ), Obx( () => AnimatedNumberFikoButton1( text: ((kayit?.value?.hesaplamalar.odenecekUcret ?? 0.0) / (kayit?.value?.hesaplamalar.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?.kumulatifMatrah()); }, ), // FikoButton1( // text: "(%30.759) 🟡", // textSize: 10, // edgePadding: const EdgeInsets.symmetric(vertical: 2.0), // textStrokeWidth: 0, // textColor: Colors.black87, // textStrokeColor: Colors.transparent, // onPressed: () {}, // ), ) ], ), ); } }