report_bug.dart 702 B

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