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

class MethodTypeCard extends StatelessWidget {
  const MethodTypeCard({
    Key key,
    this.assetPath,
    this.onTap,
    this.label, this.height = 20,
  }) : super(key: key);
  final String assetPath;
  final Function onTap;
  final String label;
  final double height;

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: onTap,
      child: Container(
          margin: EdgeInsets.all(10),
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.all(
              Radius.circular(10),
            ),
            border: Border.all(
                color: HexColor('#707070'),
                width: 0.1),
          ),
          height: 170,
          child: Padding(
            padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                Row(
                  children: [
                    Image.asset(
                      assetPath,
                      height: 60,
                      width: 60,
                    ),
                  ],
                ),
                SizedBox(
                  height:height ,
                ),
                AppText(
                  label,
                  fontSize: 14,
                  color: Color(0xFF2E303A),
                  fontWeight: FontWeight.bold,
                )
              ],
            ),
          )),
    );
  }
}
