Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
consumer_app
Commits
d7e8e584
Commit
d7e8e584
authored
2 years ago
by
Erfan Jazeb Nikoo
Browse files
Options
Download
Plain Diff
Merge branch 'erfan/report_bug' into 'v0.0.3'
erfan/report_bug See merge request
!18
parents
dc1184cc
c5d11448
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/core/services/analytics_service.dart
+3
-0
lib/core/services/analytics_service.dart
lib/locator.dart
+1
-1
lib/locator.dart
lib/providers/feedback_provider.dart
+5
-1
lib/providers/feedback_provider.dart
with
9 additions
and
2 deletions
+9
-2
lib/core/services/analytics_service.dart
+
3
-
0
View file @
d7e8e584
...
...
@@ -114,6 +114,7 @@ class AnalyticsService {
void
logReportBug
({
required
String
email
,
required
String
msg
,
required
String
ownerKey
,
required
bool
notifyMe
,
List
?
attachments
,
})
{
...
...
@@ -123,6 +124,7 @@ class AnalyticsService {
_AnalyticsProperties
.
message
:
msg
,
_AnalyticsProperties
.
notifyMe
:
notifyMe
,
_AnalyticsProperties
.
attachments
:
attachments
,
_AnalyticsProperties
.
ownerKey
:
ownerKey
,
});
}
}
...
...
@@ -163,4 +165,5 @@ class _AnalyticsProperties {
static
const
message
=
'message'
;
static
const
notifyMe
=
'notifyMe'
;
static
const
attachments
=
'attachments'
;
static
const
ownerKey
=
'owner_key'
;
}
This diff is collapsed.
Click to expand it.
lib/locator.dart
+
1
-
1
View file @
d7e8e584
...
...
@@ -17,7 +17,7 @@ Future<void> setup() async {
locator
.
registerLazySingleton
<
AppProvider
>(
()
=
>
AppProvider
(
locator
(),
locator
(),
locator
(),
locator
()));
locator
.
registerLazySingleton
<
FeedbackProvider
>(
()
=
>
FeedbackProvider
(
locator
()));
()
=
>
FeedbackProvider
(
locator
(),
locator
()));
/// SERVICES
locator
.
registerLazySingleton
<
AnalyticsService
>(()
=
>
AnalyticsService
());
...
...
This diff is collapsed.
Click to expand it.
lib/providers/feedback_provider.dart
+
5
-
1
View file @
d7e8e584
import
'package:consumer_app/core/services/analytics_service.dart'
;
import
'package:consumer_app/utilities/helpers/app_helper.dart'
;
import
'package:flutter/material.dart'
;
import
'package:shared_preferences/shared_preferences.dart'
;
enum
ReportBugState
{
report
,
done
}
class
FeedbackProvider
with
ChangeNotifier
{
final
AnalyticsService
_analyticsService
;
final
SharedPreferences
_sharedPreferences
;
FeedbackProvider
(
this
.
_analyticsService
);
FeedbackProvider
(
this
.
_analyticsService
,
this
.
_sharedPreferences
);
final
List
<
String
>
_attachments
=
[];
ReportBugState
_reportBugState
=
ReportBugState
.
report
;
...
...
@@ -48,6 +51,7 @@ class FeedbackProvider with ChangeNotifier {
msg:
msg
,
notifyMe:
reportNotifyMe
,
attachments:
_attachments
,
ownerKey:
_sharedPreferences
.
getString
(
app
.
keys
.
ownerKey
)
??
''
,
);
setReportBugState
(
ReportBugState
.
done
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets