rm dep. dropdownbtn

This commit is contained in:
Junyuan Feng
2022-11-07 19:12:17 +08:00
parent 398c49bb99
commit bd04fd3f1a
6 changed files with 71 additions and 115 deletions

View File

@@ -10,8 +10,6 @@ import 'package:toolbox/view/widget/card_dialog.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:toolbox/core/extension/stringx.dart';
void unawaited(Future<void> future) {}
bool isDarkMode(BuildContext context) =>
Theme.of(context).brightness == Brightness.dark;
@@ -110,3 +108,19 @@ Future<bool> shareFiles(BuildContext context, List<String> filePaths) async {
await Share.shareFiles(filePaths, text: 'ServerBox -> $text');
return filePaths.isNotEmpty;
}
Widget buildPopuopMenu(
{required List<PopupMenuEntry> items,
required Function(dynamic) onSelected}) {
return PopupMenuButton(
itemBuilder: (_) => items,
onSelected: onSelected,
child: const Padding(
padding: EdgeInsets.only(left: 7),
child: Icon(
Icons.more_vert,
size: 23,
),
),
);
}