Files
eatvio_app/lib/widgets/app_bar/exit_button.dart
2024-09-11 16:22:12 +03:00

35 lines
699 B
Dart

import 'package:eatvio_app/theme/custom_text_style.dart';
import 'package:flutter/material.dart';
class ExitButton extends StatelessWidget {
const ExitButton({
required this.text,
this.margin,
this.onTap,
});
final String text;
final EdgeInsetsGeometry? margin;
final Function? onTap;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTapCall,
child: Padding(
padding: margin ?? EdgeInsets.zero,
child: Text(
text,
style: CustomTextStyles.titleSmallRed200.copyWith(
color: Colors.red,
),
),
),
);
}
void onTapCall() {
onTap!.call();
}
}