2022-08-24 08:35:49 +03:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class BrandOutlinedButton extends StatelessWidget {
|
|
|
|
const BrandOutlinedButton({
|
2022-10-26 20:26:09 +04:00
|
|
|
super.key,
|
2022-08-24 08:35:49 +03:00
|
|
|
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,
|
2023-05-30 20:52:42 +03:00
|
|
|
style: OutlinedButton.styleFrom(
|
|
|
|
tapTargetSize: MaterialTapTargetSize.padded,
|
|
|
|
),
|
2022-08-24 08:35:49 +03:00
|
|
|
child: child ??
|
|
|
|
Text(
|
|
|
|
title ?? '',
|
2023-02-05 16:24:37 +03:00
|
|
|
style: Theme.of(context).textTheme.labelLarge?.copyWith(
|
2022-08-24 08:35:49 +03:00
|
|
|
color: Theme.of(context).colorScheme.primary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|