33 lines
807 B
Dart
33 lines
807 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:remixicon/remixicon.dart';
|
|
|
|
class PopupAction extends StatelessWidget {
|
|
final List<PopupMenuEntry<String>> items;
|
|
final Function(String) onSelected;
|
|
|
|
const PopupAction({
|
|
super.key,
|
|
required this.items,
|
|
required this.onSelected,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return PopupMenuButton<String>(
|
|
color: Colors.white,
|
|
offset: Offset(0, 30),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12), // 圆角
|
|
),
|
|
constraints: BoxConstraints(
|
|
minWidth: 200,
|
|
),
|
|
elevation: 6,
|
|
shadowColor: Colors.black87,
|
|
onSelected:onSelected,
|
|
itemBuilder: (context) => items,
|
|
child: const Icon(RemixIcons.more_fill),
|
|
);
|
|
}
|
|
}
|