You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
765 B
Dart
30 lines
765 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../app_style/colors.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();
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|