cofounderella/lib/components/my_button.dart

31 lines
747 B
Dart
Raw Normal View History

2024-04-29 14:36:25 +02:00
import 'package:flutter/material.dart';
class MyButton extends StatelessWidget {
void Function()? onTap;
final String text;
MyButton({
super.key,
required this.text,
required this.onTap,
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondary,
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-04-30 22:33:01 +02:00
child: Text(text, style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),),
2024-04-29 14:36:25 +02:00
),
),
);
}
}