import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter/material.dart';

import '../app_texts_widget.dart';

class CustomRow extends StatelessWidget {
  const CustomRow({
    Key? key,
    this.label = '',
    this.value = '',
    this.labelSize,
    this.valueSize,
    this.width = 0,
    this.isCopyable = true,
    this.isExpanded = true,
    this.labelColor,
    this.valueColor,
  }) : super(key: key);

  final String label;
  final String value;
  final double? labelSize;
  final double? valueSize;
  final double width;
  final bool isCopyable;
  final bool isExpanded;
  final Color? labelColor;
  final Color? valueColor;

  @override
  Widget build(BuildContext context) {
    return Row(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        AppText(
          label,
          fontSize: labelSize ?? SizeConfig.getTextMultiplierBasedOnWidth() * 2.7,
          color: labelColor ?? Color(0xFF575757),
          fontWeight: FontWeight.w600,
          letterSpacing: -0.4,
        ),
        SizedBox(
          width: 1,
        ),
        Expanded(
          child: AppText(
            value,
            fontSize: valueSize ?? SizeConfig.getTextMultiplierBasedOnWidth() * 2.9,
            color: valueColor ?? Color(0xFF2B353E),
            fontWeight: FontWeight.w700,
            letterSpacing: -0.48,
            isCopyable: isCopyable,
          ),
        ),
      ],
    );
  }
}
