Files
PiliPlus/lib/plugin/pl_player/widgets/common_btn.dart
bggRGjQaUbCoE 685852c0a4 tweak
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-08-13 18:40:20 +08:00

33 lines
640 B
Dart

import 'package:flutter/material.dart';
class ComBtn extends StatelessWidget {
final Widget icon;
final VoidCallback? onTap;
final VoidCallback? onLongPress;
final double width;
final double height;
const ComBtn({
super.key,
required this.icon,
this.onTap,
this.onLongPress,
this.width = 34,
this.height = 34,
});
@override
Widget build(BuildContext context) {
return SizedBox(
width: width,
height: height,
child: GestureDetector(
onTap: onTap,
onLongPress: onLongPress,
behavior: HitTestBehavior.opaque,
child: icon,
),
);
}
}