import 'package:flutter/material.dart';


class BalanceAmountWithRefresh extends StatelessWidget {
  final Widget amount;
  final Widget refreshButton;

  const BalanceAmountWithRefresh({
    super.key,
    required this.amount,
    required this.refreshButton,
  });

  @override
  Widget build(BuildContext context) {
    final colorScheme = Theme.of(context).colorScheme;

    return Row(
      mainAxisSize: MainAxisSize.min,
      children: [
        IconButtonTheme(
          data: IconButtonThemeData(
            style: IconButton.styleFrom(
              minimumSize: const Size(30, 30),
              maximumSize: const Size(40, 40),
              padding: EdgeInsets.zero,
              foregroundColor: colorScheme.primary,
              tapTargetSize: MaterialTapTargetSize.shrinkWrap,
            ),
          ),
          child: refreshButton,
        ),
        const SizedBox(width: 8),
        amount,
      ],
    );
  }
}
