mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-16 13:43:17 +00:00
37 lines
946 B
Dart
37 lines
946 B
Dart
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(
|
|
minWidth: double.infinity,
|
|
),
|
|
child: OutlinedButton(
|
|
onPressed: onPressed,
|
|
style: OutlinedButton.styleFrom(
|
|
tapTargetSize: MaterialTapTargetSize.padded,
|
|
),
|
|
child: child ??
|
|
Text(
|
|
title ?? '',
|
|
style: Theme.of(context).textTheme.labelLarge?.copyWith(
|
|
color: Theme.of(context).colorScheme.primary,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|