import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';

import '../text.dart';

class MedicalProfileItem extends StatelessWidget {
  MedicalProfileItem({
    @required this.imagePath,
    @required this.title,
    @required this.subTitle,
  });

  final String imagePath;
  final String title;
  final String subTitle;

  @override
  Widget build(BuildContext context) {
    return RoundedContainer(
      showBorder: true,
      borderWidth: 0,
      margin: 4,
      height:120,// MediaQuery.of(context).size.height * 0.12,
      child: Container(
        //width: MediaQuery.of(context).size.width * 0.25,
      //  width: MediaQuery.of(context).size.width* 0.40,

        padding: EdgeInsets.all(10),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Texts(title,
                fontSize: 1.5 * SizeConfig.textMultiplier,
                color: Theme.of(context).primaryColor,
                fontWeight: FontWeight.bold),
            RichText(
              text: TextSpan(
                style: TextStyle(color: Colors.black),
                children: [
                  TextSpan(text: subTitle),
                ],
              ),
            ),
            Align(
              alignment: Alignment.bottomRight,
              child: Image.asset(
                "assets/images/medical/$imagePath",
                height: SizeConfig.heightMultiplier * 5,
                width: SizeConfig.heightMultiplier * 5,
              ),
            )
          ],
        ),
      ),
    );
  }
}
