import 'package:flutter/cupertino.dart'; import 'package:hum/core/constants/app_theme.dart'; import 'package:phosphor_flutter/phosphor_flutter.dart'; class WDGListingButton extends StatelessWidget { final String text; final String description; final double width; final VoidCallback action; final IconData icon; final Color iconColor; const WDGListingButton({ super.key, this.text = 'as', this.description = 'asdas', this.width = double.infinity, this.icon = PhosphorIconsDuotone.camera, this.iconColor = CupertinoColors.activeBlue, required this.action, }); @override Widget build(BuildContext context) { final double sizeIcon = 60; return SizedBox( width: width, child: CupertinoButton.filled( padding: EdgeInsets.all(16), color: colorBarControl.withAlpha(20), borderRadius: BorderRadius.circular(roundLarge), onPressed: action, child: Row( spacing: 16, children: [ Stack( alignment: AlignmentDirectional.center, children: [ Container( width: sizeIcon, height: sizeIcon, decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: iconColor), ), PhosphorIcon(icon, size: 36.0), ], ), Column( spacing: 6, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(text, style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), Opacity(opacity: .5, child: Text(description, style: TextStyle(fontSize: 14))), ], ), Spacer(), Opacity( opacity: .4, child: PhosphorIcon( PhosphorIconsRegular.caretRight, // color: Colors.green, size: 24.0, ), ), ], ), ), ); } }