import 'package:flutter/material.dart';

class RecordCommonItem extends StatelessWidget {
  final String itemName;
  final String itemValue;
  final double fontSize;
  const RecordCommonItem({
    super.key,
    required this.itemName,
    required this.itemValue,
    required this.fontSize,
  });

  @override
  Widget build(BuildContext context) {
    return _buildItem(itemName, itemValue, fontSize);
  }

  Widget _buildItem(String itemName, String itemValue, double fontSize) {
    return SizedBox(
      child: Text.rich(
        TextSpan(
          text: '$itemName  ',
          style: TextStyle(
            color: Colors.black38,
            fontSize: fontSize,
          ),
          children: [
            TextSpan(
              text: itemValue,
              style: TextStyle(
                color: Colors.black,
                fontSize: fontSize,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
