mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
29 lines
545 B
Dart
29 lines
545 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ComBtn extends StatelessWidget {
|
|
final Widget icon;
|
|
final VoidCallback? onTap;
|
|
final VoidCallback? onLongPress;
|
|
|
|
const ComBtn({
|
|
required this.icon,
|
|
this.onTap,
|
|
this.onLongPress,
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: 34,
|
|
height: 34,
|
|
child: GestureDetector(
|
|
onTap: onTap,
|
|
onLongPress: onLongPress,
|
|
behavior: HitTestBehavior.opaque,
|
|
child: icon,
|
|
),
|
|
);
|
|
}
|
|
}
|