import 'package:hmg_patient_app/core/viewModels/project_view_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class ArrowBack extends StatefulWidget {
  final VoidCallback? onTap;

  ArrowBack({
    Key? key,
    this.onTap,
  }) : super(key: key);

  @override
  State<ArrowBack> createState() => _ArrowBackState();
}

class _ArrowBackState extends State<ArrowBack> {
  @override
  Widget build(BuildContext context) {
    // ProjectViewModel projectViewModel = Provider.of(context);
    return GestureDetector(
      behavior: HitTestBehavior.opaque,
      onTap: Feedback.wrapForTap(() {
      ///  widget.onTap != null ? widget.onTap :
        Navigator.maybePop(context);
      }, context),
      child: Icon(
        Icons.arrow_back_ios,
        color: Color(0xff2B353E),
      ),
    );
  }
}
