import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import '../text.dart';

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

  final String imagePath;
  final String title;
  final String subTitle;
  final bool hasBadge = false;

  @override
  Widget build(BuildContext context) {
    ProjectViewModel projectViewModel = Provider.of(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),
            Texts(subTitle,fontSize: 1.4 * SizeConfig.textMultiplier,),
            Align(
              alignment:projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
              child: Image.asset(
                "assets/images/medical/$imagePath",
                height: SizeConfig.heightMultiplier * 5,
                width: SizeConfig.heightMultiplier * 5,
              ),
            )
          ],
        ),
      ),
    );
  }
}
