File tree 4 files changed +23
-21
lines changed
4 files changed +23
-21
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ class ProactiveReportingConfigsBuilder {
29
29
/// Controls the time gap between showing 2 proactive reporting dialogs in seconds
30
30
ProactiveReportingConfigsBuilder setGapBetweenModals (int gap) {
31
31
if (gap <= 0 ) {
32
- _logWarning ('gapBetweenModals must be a positive number. Using default value of 30 seconds.' );
32
+ _logWarning (
33
+ 'gapBetweenModals must be a positive number. Using default value of 30 seconds.' );
33
34
return this ;
34
35
}
35
36
gapBetweenModals = gap;
@@ -39,7 +40,8 @@ class ProactiveReportingConfigsBuilder {
39
40
/// Controls the time gap between detecting a frustrating experience
40
41
ProactiveReportingConfigsBuilder setModalDelayAfterDetection (int delay) {
41
42
if (delay <= 0 ) {
42
- _logWarning ('modalDelayAfterDetection must be a positive number. Using default value of 15 seconds.' );
43
+ _logWarning (
44
+ 'modalDelayAfterDetection must be a positive number. Using default value of 15 seconds.' );
43
45
return this ;
44
46
}
45
47
modalDelayAfterDetection = delay;
Original file line number Diff line number Diff line change @@ -260,7 +260,8 @@ class BugReporting implements BugReportingFlutterApi {
260
260
/// prompts end users to submit their feedback after our SDK automatically detects a frustrating experience.
261
261
/// [config] configuration of proActive bug report.
262
262
static Future <void > setProactiveReportingConfigurations (
263
- ProactiveReportingConfigs config,) async {
263
+ ProactiveReportingConfigs config,
264
+ ) async {
264
265
_host.setProactiveReportingConfigurations (config.enabled,
265
266
config.gapBetweenModals, config.modalDelayAfterDetection);
266
267
}
Original file line number Diff line number Diff line change @@ -28,8 +28,10 @@ abstract class BugReportingHostApi {
28
28
void bindOnInvokeCallback ();
29
29
void bindOnDismissCallback ();
30
30
void setDisclaimerText (String text);
31
- void setCommentMinimumCharacterCount (int limit,
32
- List <String >? reportTypes,);
33
- void setProactiveReportingConfigurations (bool enabled, int gapBetweenModals,
34
- int modalDelayAfterDetection);
31
+ void setCommentMinimumCharacterCount (
32
+ int limit,
33
+ List <String >? reportTypes,
34
+ );
35
+ void setProactiveReportingConfigurations (
36
+ bool enabled, int gapBetweenModals, int modalDelayAfterDetection);
35
37
}
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ void main() {
100
100
101
101
test (
102
102
'[setVideoRecordingFloatingButtonPosition] should call host method' ,
103
- () async {
103
+ () async {
104
104
const position = Position .topLeft;
105
105
106
106
await BugReporting .setVideoRecordingFloatingButtonPosition (position);
@@ -202,17 +202,14 @@ void main() {
202
202
});
203
203
204
204
test ('[setProactiveReportingConfigurations] should call host method' ,
205
- () async {
206
- await BugReporting .setProactiveReportingConfigurations (
207
- ProactiveReportingConfigsBuilder ()
208
- .setGapBetweenModals (1 )
209
- .setModalDelayAfterDetection (1 )
210
- .isEnabled (true )
211
- .build ());
212
-
213
- verify (
214
- mHost.setProactiveReportingConfigurations (
215
- true , 1 , 1
216
- )).called (1 );
217
- });
205
+ () async {
206
+ await BugReporting .setProactiveReportingConfigurations (
207
+ ProactiveReportingConfigsBuilder ()
208
+ .setGapBetweenModals (1 )
209
+ .setModalDelayAfterDetection (1 )
210
+ .isEnabled (true )
211
+ .build ());
212
+
213
+ verify (mHost.setProactiveReportingConfigurations (true , 1 , 1 )).called (1 );
214
+ });
218
215
}
You can’t perform that action at this time.
0 commit comments