2024-04-29 14:36:25 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2024-06-18 02:24:42 +02:00
|
|
|
import 'text_bold.dart';
|
2024-04-29 14:36:25 +02:00
|
|
|
|
|
|
|
class MyButton extends StatelessWidget {
|
2024-05-16 16:57:17 +02:00
|
|
|
final void Function()? onTap;
|
2024-04-29 14:36:25 +02:00
|
|
|
final String text;
|
|
|
|
|
2024-05-16 16:57:17 +02:00
|
|
|
const MyButton({
|
2024-04-29 14:36:25 +02:00
|
|
|
super.key,
|
|
|
|
required this.text,
|
|
|
|
required this.onTap,
|
|
|
|
});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return GestureDetector(
|
|
|
|
onTap: onTap,
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
2024-06-18 02:24:42 +02:00
|
|
|
color: Theme.of(context).colorScheme.secondaryContainer,
|
2024-04-29 14:36:25 +02:00
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
),
|
2024-04-30 22:33:01 +02:00
|
|
|
padding: const EdgeInsets.all(16),
|
2024-04-29 14:36:25 +02:00
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 25),
|
|
|
|
child: Center(
|
2024-06-18 02:24:42 +02:00
|
|
|
child: TextBold(text: text),
|
2024-04-29 14:36:25 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|