selfprivacy.org.app/lib/ui/components/buttons/outlined_button.dart

35 lines
858 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
class BrandOutlinedButton extends StatelessWidget {
const BrandOutlinedButton({
super.key,
this.onPressed,
this.title,
this.child,
this.disabled = false,
});
final VoidCallback? onPressed;
final String? title;
final Widget? child;
final bool disabled;
@override
Widget build(final BuildContext context) => ConstrainedBox(
constraints: const BoxConstraints(
minHeight: 40,
minWidth: double.infinity,
),
child: OutlinedButton(
onPressed: onPressed,
child: child ??
Text(
title ?? '',
2023-02-05 13:24:37 +00:00
style: Theme.of(context).textTheme.labelLarge?.copyWith(
color: Theme.of(context).colorScheme.primary,
),
),
),
);
}