You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
app/lib/widgets/recook_back_button.dart

25 lines
681 B

import 'package:flutter/material.dart';
import 'package:recook/constants/app_image_resources.dart';
import 'package:recook/constants/styles.dart';
class RecookBackButton extends StatelessWidget {
final bool white;
const RecookBackButton({Key key, this.white = false}) : super(key: key);
@override
Widget build(BuildContext context) {
if (Navigator.canPop(context)) {
return IconButton(
icon: Icon(
AppIcons.icon_back,
size: 17,
color: white ? Colors.white : AppColor.blackColor,
),
onPressed: () {
Navigator.maybePop(context);
});
} else
return SizedBox();
}
}