import 'package:hmg_patient_app/uitl/app_toast.dart';
import 'package:hmg_patient_app/widgets/data_display/text.dart';
import 'package:hmg_patient_app/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class AccountServices extends StatelessWidget {
  final String? title;
  final String? serviceImage;
  final VoidCallback? onTap;

  const AccountServices({this.title, this.onTap, this.serviceImage});

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: InkWell(
        onTap: onTap,
        //     () {
        //   if (customerId == null) {
        //     AppToast.showErrorToast(
        //         message: "Customer not found");
        //     return;
        //   }
        //   Navigator.push(
        //       context,
        //       FadePage(
        //           page: OrderPage(
        //               customerID: customerId)));
        // },
        child: Column(
          children: <Widget>[
//                                Image(image: AssetImage('assets/images/pharmacy/orders_icon.svg')),
            SvgPicture.asset(
              '$serviceImage',
              width: 55,
              height: 55,
            ),
            SizedBox(
              height: 7,
            ),
            Texts(
              title!,
              fontSize: 15.0,
              fontWeight: FontWeight.bold,
            ),
          ],
        ),
      ),
    );
  }
}
