Rain/lib/app/ui/widgets/button.dart

31 lines
801 B
Dart
Raw Normal View History

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(
2025-03-15 23:40:48 +03:00
context.theme.colorScheme.secondaryContainer.withAlpha(80),
),
2024-07-24 23:07:35 +03:00
),
2023-07-14 20:19:43 +03:00
onPressed: onPressed,
2025-03-15 23:40:48 +03:00
child: Text(buttonName, style: context.textTheme.titleMedium),
2023-06-17 20:57:57 +03:00
),
);
}
}