mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-18 17:37:50 +00:00
29 lines
697 B
Dart
29 lines
697 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class SPBrandButton extends StatelessWidget {
|
||
|
const SPBrandButton({
|
||
|
required this.child,
|
||
|
required this.onPressed,
|
||
|
super.key,
|
||
|
});
|
||
|
|
||
|
SPBrandButton.text({
|
||
|
required final String title,
|
||
|
required this.onPressed,
|
||
|
super.key,
|
||
|
}) : child = Text(title);
|
||
|
|
||
|
final Widget child;
|
||
|
final VoidCallback onPressed;
|
||
|
|
||
|
@override
|
||
|
Widget build(final BuildContext context) => FilledButton(
|
||
|
// TODO(misterfourtytwo): move button styles to theme configuration
|
||
|
style: const ButtonStyle(
|
||
|
minimumSize: MaterialStatePropertyAll(Size.fromHeight(48)),
|
||
|
),
|
||
|
onPressed: onPressed,
|
||
|
child: child,
|
||
|
);
|
||
|
}
|