report_bug_popup.dart 660 B

123456789101112131415161718192021222324252627
  1. import 'package:flutter/material.dart';
  2. import 'package:photos/utils/email_util.dart';
  3. PopupMenuButton<dynamic> reportBugPopupMenu(BuildContext context) {
  4. return PopupMenuButton(
  5. itemBuilder: (context) {
  6. final List<PopupMenuItem> items = [];
  7. items.add(
  8. PopupMenuItem(
  9. value: 1,
  10. child: Row(
  11. children: const [
  12. Text("contact support"),
  13. ],
  14. ),
  15. ),
  16. );
  17. return items;
  18. },
  19. onSelected: (value) async {
  20. if (value == 1) {
  21. await sendLogs(context, "contact support", "support@ente.io",
  22. postShare: () {});
  23. }
  24. },
  25. );
  26. }