2023-06-17 20:57:57 +03:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
|
|
|
class MyTextButton extends StatelessWidget {
|
|
|
|
const MyTextButton({
|
|
|
|
super.key,
|
|
|
|
required this.buttonName,
|
|
|
|
required this.onTap,
|
|
|
|
required this.bgColor,
|
|
|
|
});
|
|
|
|
final String buttonName;
|
|
|
|
final Function() onTap;
|
|
|
|
final Color bgColor;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
height: 50,
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: bgColor,
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
),
|
|
|
|
child: TextButton(
|
|
|
|
onPressed: onTap,
|
|
|
|
child: Text(
|
|
|
|
buttonName,
|
2023-07-09 23:41:51 +03:00
|
|
|
style: context.textTheme.titleMedium,
|
2023-06-17 20:57:57 +03:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|