mirror of
https://github.com/Mercantec-GHC/h4-projekt-gruppe-0-sm.git
synced 2025-04-28 16:54:06 +02:00
22 lines
490 B
Dart
22 lines
490 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class PrimaryButton extends StatelessWidget {
|
|
final void Function()? onPressed;
|
|
final Widget child;
|
|
|
|
const PrimaryButton({
|
|
super.key,
|
|
required this.onPressed,
|
|
required this.child,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TextButton(
|
|
onPressed: onPressed,
|
|
style: TextButton.styleFrom(
|
|
backgroundColor: Colors.blue, foregroundColor: Colors.white),
|
|
child: child);
|
|
}
|
|
}
|