Files
zh-chat-flutter/lib/views/home/widgets/pop_menu_item.dart
2022-10-20 14:21:39 +08:00

30 lines
585 B
Dart

import 'package:flutter/material.dart';
import 'package:get/get.dart';
class PopMenuItem extends StatelessWidget {
final String text;
final VoidCallback? onTap;
const PopMenuItem(
this.text, {
this.onTap,
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
onTap?.call();
},
child: Container(
height: 52,
width: Get.width,
alignment: Alignment.center,
child: Text(text),
),
);
}
}