Files
wehub-resource-sync bb087aad19
CI / format (push) Failing after 2s
CI / packaging (push) Failing after 0s
CI / test (push) Failing after 3s
chore: import upstream snapshot with attribution
2026-07-13 11:58:56 +08:00

29 lines
811 B
Dart

import 'package:flutter/material.dart';
import 'package:localsend_app/util/native/platform_check.dart';
class CustomIconButton extends StatelessWidget {
final VoidCallback? onPressed;
final Widget child;
const CustomIconButton({
required this.onPressed,
required this.child,
super.key,
});
@override
Widget build(BuildContext context) {
return TextButton(
style: TextButton.styleFrom(
foregroundColor: Theme.of(context).colorScheme.onSurface,
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
minimumSize: Size.zero,
shape: const CircleBorder(),
padding: checkPlatformIsDesktop() ? const EdgeInsets.symmetric(horizontal: 8, vertical: 16) : const EdgeInsets.all(8),
),
onPressed: onPressed,
child: child,
);
}
}