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,
|
2023-07-14 20:19:43 +03:00
|
|
|
required this.onPressed,
|
2023-06-17 20:57:57 +03:00
|
|
|
});
|
|
|
|
final String buttonName;
|
2024-07-24 23:07:35 +03:00
|
|
|
final VoidCallback? onPressed;
|
2023-06-17 20:57:57 +03:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2023-07-14 20:19:43 +03:00
|
|
|
return SizedBox(
|
|
|
|
height: 50,
|
|
|
|
width: double.infinity,
|
|
|
|
child: ElevatedButton(
|
2024-07-24 23:07:35 +03:00
|
|
|
style: ButtonStyle(
|
|
|
|
shadowColor: const WidgetStatePropertyAll(Colors.transparent),
|
|
|
|
backgroundColor: WidgetStatePropertyAll(
|
|
|
|
context.theme.colorScheme.secondaryContainer.withAlpha(80)),
|
|
|
|
),
|
2023-07-14 20:19:43 +03:00
|
|
|
onPressed: onPressed,
|
|
|
|
child: Text(
|
|
|
|
buttonName,
|
|
|
|
style: context.textTheme.titleMedium,
|
2023-06-17 20:57:57 +03:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|