mirror of
https://github.com/foss42/apidash.git
synced 2025-05-20 07:46:32 +08:00
Migrate to ADFilledButton & ADTextButton
This commit is contained in:
@ -16,10 +16,6 @@ class CopyButton extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var sm = ScaffoldMessenger.of(context);
|
||||
const icon = Icon(
|
||||
Icons.content_copy,
|
||||
size: 18,
|
||||
);
|
||||
onPressed() async {
|
||||
await Clipboard.setData(ClipboardData(text: toCopy));
|
||||
sm.hideCurrentSnackBar();
|
||||
@ -27,14 +23,15 @@ class CopyButton extends StatelessWidget {
|
||||
}
|
||||
|
||||
return showLabel
|
||||
? TextButton.icon(
|
||||
? ADTextButton(
|
||||
icon: Icons.content_copy,
|
||||
iconSize: kButtonIconSizeLarge,
|
||||
label: kLabelCopy,
|
||||
onPressed: onPressed,
|
||||
icon: icon,
|
||||
label: const Text(kLabelCopy),
|
||||
)
|
||||
: ADIconButton(
|
||||
icon: Icons.content_copy,
|
||||
iconSize: 18,
|
||||
iconSize: kButtonIconSizeLarge,
|
||||
tooltip: kLabelCopy,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
visualDensity: VisualDensity.compact,
|
||||
|
Reference in New Issue
Block a user