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

class ArrowBack extends StatelessWidget {
  final Function onTap;

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

  @override
  Widget build(BuildContext context) {
    ProjectViewModel projectViewModel = Provider.of(context);
    return GestureDetector(
      behavior: HitTestBehavior.opaque,
      onTap: Feedback.wrapForTap(() {
        onTap != null ? onTap() : Navigator.pop(context);
      }, context),
      child: Icon(Icons.arrow_back_ios,
          color: Theme.of(context).textTheme.headline1.color),
    );
  }
}
