import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:test_sa/views/app_style/colors.dart'; import 'app_icon_button.dart'; class ABackButton extends StatelessWidget { final VoidCallback onPressed; const ABackButton({Key key, this.onPressed}) : 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.green, iconData: FontAwesomeIcons.reply, iconSize: 24, buttonSize: 42, onPressed: onPressed ?? (){ Navigator.of(context).pop(); }, ), ); } }