import 'package:flutter/material.dart';

import 'app_icon_button.dart';

class ABackButton extends StatelessWidget {
  final VoidCallback? onPressed;
  final IconData? icon;

  const ABackButton({Key? key, this.onPressed, this.icon}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16),
      child: AIconButton(
        // color: AColors.white,
        // backgroundColor: AColors.primaryColor,
        iconData: icon ?? Icons.arrow_back_ios_new,
        iconSize: 24,
        buttonSize: 40,
        onPressed: onPressed ??
            () {
              Navigator.of(context).pop();
            },
      ),
    );
  }
}
