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

class GetActivityCard extends StatelessWidget {
  final value;

  GetActivityCard(this.value);

  @override
  Widget build(BuildContext context) {
    double width = SizeConfig.heightMultiplier! *
        (SizeConfig.isHeightVeryShort
            ? 16
            : SizeConfig.isHeightShort
                ? 14
                : SizeConfig.isHeightLarge
                    ? 15
                    : 13);
    return Container(
      width: width,
      padding: EdgeInsets.symmetric(
          horizontal: SizeConfig.heightMultiplier! * .4,
          vertical: SizeConfig.heightMultiplier! * .2),
      margin: EdgeInsets.all(SizeConfig.widthMultiplier! * 1),
      decoration: BoxDecoration(
        color: Colors.white,
        border: Border.all(width: 1.5, color: Color(0xFFEFEFEF)),
        borderRadius: BorderRadius.circular(15),
      ),
      child: Padding(
        padding: const EdgeInsets.fromLTRB(8, 8, 8, 4),
        child: Center(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisAlignment: MainAxisAlignment.start,
            children: [
              AppText(
                value.value.toString(),
                fontSize:
                    SizeConfig.getTextMultiplierBasedOnWidth(width: width) * 25,
                fontWeight: FontWeight.bold,
                color: AppGlobal.appTextColor,
                letterSpacing: -0.93,
              ),
              AppText(
                value.kPIParameter,
                textOverflow: TextOverflow.clip,
                fontHeight: 1.4,
                fontSize:
                    SizeConfig.getTextMultiplierBasedOnWidth(width: width) *
                        (SizeConfig.isHeightVeryShort
                            ? 8
                            : SizeConfig.isHeightShort
                                ? 8
                                : 9.3),
                color: AppGlobal.appTextColor,
                textAlign: TextAlign.start,
                fontWeight: FontWeight.w600,
                letterSpacing: -0.33,
              ),
            ],
          ),
        ),
      ),
    );
  }
}
