elCaribe app - customization and branding
This commit is contained in:
20
news-app/lib/ui/widgets/customBackBtn.dart
Normal file
20
news-app/lib/ui/widgets/customBackBtn.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:news/utils/uiUtils.dart';
|
||||
|
||||
class CustomBackButton extends StatelessWidget {
|
||||
final Function? onTap;
|
||||
final double? horizontalPadding;
|
||||
|
||||
const CustomBackButton({super.key, this.onTap, this.horizontalPadding});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: horizontalPadding ?? 0),
|
||||
child: InkWell(
|
||||
onTap: () => onTap ?? Navigator.of(context).pop(),
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
child: Icon(Icons.arrow_back, color: UiUtils.getColorScheme(context).primaryContainer)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user