import 'package:fikoyt_ui/fikoyt_ui.dart'; import 'package:flutter/material.dart'; class MiniHesapKart extends StatefulWidget { const MiniHesapKart({ super.key, this.simge, this.ustBaslik, this.baslik, this.altBaslik, this.progressValue, this.progress, this.sagUstBaslik, this.solUstWidget, }); final String? simge; final String? ustBaslik; final String? baslik; final String? altBaslik; final String? sagUstBaslik; final Widget? solUstWidget; final double? progressValue; final bool? progress; @override _MiniHesapKartState createState() => _MiniHesapKartState(); } class _MiniHesapKartState extends State { @override Widget build(BuildContext context) { return AnimatedContainer( constraints: const BoxConstraints(minWidth: 110, maxWidth: 110, minHeight: 30), duration: Duration(seconds: 1), decoration: BoxDecoration( color: Colors.blue.withValues(alpha: 300), shape: BoxShape.rectangle, borderRadius: const BorderRadius.all(Radius.circular(5)), border: Border.all(color: Colors.blue, width: 1), boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.5), spreadRadius: 1, blurRadius: 3, offset: const Offset(0, 1), // changes position of shadow ), ], ), margin: const EdgeInsets.all(2), // padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 3), child: Stack( children: [ /// Sağ Üst Positioned( top: 0, right: 0, child: FikoYTButton( text: widget.sagUstBaslik ?? "", tema: FikoYTButtonTheme( fontSize: 13, textColor: Colors.white, textStrokeColor: Colors.transparent, textStrokeWidth: 0, textAlign: TextAlign.center, ), ), ), /// Positioned(top: 0, left: 0, child: widget.solUstWidget ?? SizedBox.shrink()), Positioned( top: 0, child: FikoYTButton( text: widget.ustBaslik ?? "", tema: FikoYTButtonTheme( fontSize: 10, textColor: Colors.white, textStrokeColor: Colors.transparent, textStrokeWidth: 0, textAlign: TextAlign.center, ), ), ), /// InkWell( splashColor: Colors.yellow, onTap: () {}, child: Padding( padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 3), child: Column( children: [ Text(widget.simge ?? "💳", style: const TextStyle(fontSize: 24)), Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ FikoYTButton( text: widget.baslik ?? "İsimsiz Hesap", tema: FikoYTButtonTheme( fontSize: 10, textColor: Colors.white, textStrokeColor: Colors.transparent, textStrokeWidth: 0, textAlign: TextAlign.center, ), ), FikoYTButton( text: widget.altBaslik ?? 0.0, tema: FikoYTButtonTheme( fontSize: 10, textColor: Colors.white, textStrokeColor: Colors.transparent, textStrokeWidth: 0, textAlign: TextAlign.left, ), ), ], ), ], ), Container( margin: const EdgeInsets.symmetric(vertical: 2), height: 4, decoration: BoxDecoration( boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.5), spreadRadius: 1, blurRadius: 3, offset: const Offset(0, 1), // changes position of shadow ), ], ), child: const LinearProgressIndicator( value: 0.7, borderRadius: BorderRadius.all(Radius.circular(4)), valueColor: AlwaysStoppedAnimation(Color.fromARGB(255, 238, 255, 0)), backgroundColor: Color(0xffD6D6D6), ), ), ], ), ), ), ], ), ); } }