growme/app/lib/components/button.dart
2022-09-29 14:03:41 +02:00

32 lines
799 B
Dart

import 'package:flutter/material.dart';
import 'package:grow_me_app/main.dart';
class Button extends StatelessWidget {
const Button(this.text, this.onTap, {super.key});
final void Function() onTap;
final String text;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
height: 50.0,
padding: const EdgeInsets.all(8.0),
margin: const EdgeInsets.symmetric(horizontal: 8.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
color: primarySwatch,
shape: BoxShape.rectangle,
),
child: Center(
child: Text(
text,
style: TextStyle(color: lightBackgroundColor),
)),
),
);
}
}