File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -126,4 +126,10 @@ class NetworkLogger {
126126 }
127127 return null ;
128128 }
129+
130+ /// Enables or disables network logs sensitive information auto masking.
131+ /// [boolean] isEnabled
132+ static Future <void > setAutoMaskingEnabled (bool isEnabled) async {
133+ return _host.setAutoMaskingEnabled (isEnabled);
134+ }
129135}
Original file line number Diff line number Diff line change @@ -74,4 +74,6 @@ abstract class InstabugHostApi {
7474 Map <String , bool > isW3CFeatureFlagsEnabled ();
7575
7676 void willRedirectToStore ();
77+
78+ void setAutoMaskingEnabled (bool isEnabled);
7779}
Original file line number Diff line number Diff line change @@ -229,4 +229,14 @@ void main() {
229229 await logger.networkLog (networkData);
230230 expect (networkData.requestHeaders['traceparent' ], 'test' );
231231 });
232+
233+ test ('[setAutoMaskingEnabled] should call host method' , () async {
234+ const enabled = true ;
235+
236+ await NetworkLogger .setAutoMaskingEnabled (enabled);
237+
238+ verify (
239+ mInstabugHost.setAutoMaskingEnabled (enabled),
240+ ).called (1 );
241+ });
232242}
You can’t perform that action at this time.
0 commit comments