|
@@ -1,13 +1,12 @@
|
|
|
import 'package:flutter/material.dart';
|
|
|
-import 'package:flutter_email_sender/flutter_email_sender.dart';
|
|
|
import 'package:logging/logging.dart';
|
|
|
import 'package:photos/core/configuration.dart';
|
|
|
import 'package:photos/core/constants.dart';
|
|
|
import 'package:photos/ui/settings/settings_section_title.dart';
|
|
|
import 'package:photos/ui/settings/settings_text_item.dart';
|
|
|
import 'package:photos/ui/web_page.dart';
|
|
|
+import 'package:photos/utils/dialog_util.dart';
|
|
|
import 'package:photos/utils/email_util.dart';
|
|
|
-import 'package:photos/utils/toast_util.dart';
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
class SupportSectionWidget extends StatelessWidget {
|
|
@@ -23,14 +22,14 @@ class SupportSectionWidget extends StatelessWidget {
|
|
|
behavior: HitTestBehavior.translucent,
|
|
|
onTap: () async {
|
|
|
try {
|
|
|
- final Email email = Email(
|
|
|
- recipients: ['hey@ente.io'],
|
|
|
- isHTML: false,
|
|
|
+ final Uri emailLaunchUri = Uri(
|
|
|
+ scheme: 'mailto',
|
|
|
+ path: kSupportEmail,
|
|
|
);
|
|
|
- await FlutterEmailSender.send(email);
|
|
|
+ launchUrl(emailLaunchUri);
|
|
|
} catch (e) {
|
|
|
Logger("SupportSection").severe(e);
|
|
|
- launch("mailto:hey@ente.io");
|
|
|
+ showErrorDialog(context, "", "please email us at $kSupportEmail");
|
|
|
}
|
|
|
},
|
|
|
child: SettingsTextItem(text: "email", icon: Icons.navigate_next),
|