@@ -44,6 +44,8 @@ class AuthenticationService {
4444 static StreamController<bool> isLoggedInStream =
4545 StreamController<bool>.broadcast();
4646
47+ static const String supportEmail = '
[email protected] ';
48+
4749 StreamController<bool> progress = StreamController.broadcast();
4850
4951 final Stream<bool> _isLoggedIn = isLoggedInStream.stream;
@@ -214,12 +216,11 @@ class AuthenticationService {
214216 await writeTokensToStorage();
215217 await fetchUser();
216218 } on DioException catch (err, st) {
217- String supportEmail = Uri.encodeComponent('
[email protected] ');
218219 String subject = Uri.encodeComponent('Error logging in to mobile app');
219220 Navigator.pop(context);
220221 if (err.response != null) {
221222 String body = Uri.encodeComponent(
222- 'Please email the below error to
[email protected] \n\n${err.response!.data.toString()}\n\n${st.toString()}');
223+ 'Please email the below error to ${AuthenticationService.supportEmail} \n\n${err.response!.data.toString()}\n\n${st.toString()}');
223224 await showDialog(
224225 context: context,
225226 barrierDismissible: false,
@@ -235,7 +236,7 @@ class AuthenticationService {
235236 content: SingleChildScrollView(
236237 child: SelectionArea(
237238 child: Text(
238- 'Please email the below error to
[email protected] :\n\n${err.response!.data.toString()}\n\n${st.toString()}',
239+ 'Please email the below error to ${AuthenticationService.supportEmail} :\n\n${err.response!.data.toString()}\n\n${st.toString()}',
239240 ),
240241 ),
241242 ),
@@ -247,7 +248,7 @@ class AuthenticationService {
247248 onPressed: () async {
248249 logout();
249250 await launchUrl(Uri.parse(
250- 'mailto:$supportEmail?subject=$subject&body=$body'));
251+ 'mailto:${AuthenticationService. supportEmail} ?subject=$subject&body=$body'));
251252 Navigator.pop(context);
252253 },
253254 child: const Text('Email Error'),
@@ -267,7 +268,7 @@ class AuthenticationService {
267268 );
268269 } else {
269270 String body = Uri.encodeComponent(
270- 'Please email the below error to
[email protected] \n\n${err.toString()}\n\n${st.toString()}');
271+ 'Please email the below error to ${AuthenticationService.supportEmail} \n\n${err.toString()}\n\n${st.toString()}');
271272 await showDialog(
272273 context: context,
273274 barrierDismissible: false,
@@ -283,7 +284,7 @@ class AuthenticationService {
283284 content: SingleChildScrollView(
284285 child: SelectionArea(
285286 child: Text(
286- 'Please email the below error to
[email protected] :\n\n${err.toString()}\n\n${st.toString()}',
287+ 'Please email the below error to ${AuthenticationService.supportEmail} :\n\n${err.toString()}\n\n${st.toString()}',
287288 ),
288289 ),
289290 ),
@@ -295,7 +296,7 @@ class AuthenticationService {
295296 onPressed: () async {
296297 logout();
297298 await launchUrl(Uri.parse(
298- 'mailto:$supportEmail?subject=$subject&body=$body'));
299+ 'mailto:${AuthenticationService. supportEmail} ?subject=$subject&body=$body'));
299300 Navigator.pop(context);
300301 },
301302 child: const Text('Email Error'),
0 commit comments