11import 'package:equatable/equatable.dart' ;
22
33final class BugseeConfigState extends Equatable {
4- /// indicate if the app require a restart to reactivate the bugsee configurations
4+ /// Indicate if the app require a restart to reactivate the bugsee configurations
55 ///
66 /// `true` only if `isConfigurationValid == true` and bugsee is turned on
77 bool isRestartRequired;
88
9- /// indicate if bugsee is enabled or not
9+ /// Indicate if bugsee is enabled or not
1010 /// by default bugsee is enabled if `isConfigurationValid == true` .
1111 bool isBugseeEnabled;
1212
13- /// indicate whether video capturing is enabled or not.
13+ /// Indicate whether video capturing is enabled or not.
1414 /// enabled by default if `isBugseeEnabled == true` .
1515 ///
1616 /// cannot be true if `isBugseeEnabled == false` .
1717 bool isVideoCaptureEnabled;
1818
19- /// indicate if bugsee configuration is valid
19+ /// Indicate if bugsee configuration is valid
2020 /// config is valid if app in release mode and the provided token is valid
2121 /// following the [bugseeTokenFormat] regex.
2222 bool isConfigurationValid;
2323
24- /// indicate whether data is obscured in report videos
24+ /// Indicate whether data is obscured in report videos
2525 ///
2626 /// cannot be true if `isBugseeEnabled == false` .
2727 bool isDataObscured;
2828
29+ /// Indicate whether log will be collected during Bugsee reporting or not
30+ /// by default logs are collected but filterd.
31+ ///
32+ /// This value is initialized from [dotenv.env] and shared prefs storage.
33+ bool isLogCollectionEnabled;
34+
35+ /// Indicate whether log will be filterd or not
36+ /// by default all logs are filted using [bugseeFilterRegex] defined in [BugseeManager]
37+ ///
38+ /// This value is initialized from [dotenv.env] map and shared prefs storage.
39+ bool isLogFilterEnabled;
40+
2941 BugseeConfigState ({
3042 this .isRestartRequired = false ,
3143 this .isBugseeEnabled = false ,
3244 this .isVideoCaptureEnabled = false ,
3345 this .isConfigurationValid = false ,
3446 this .isDataObscured = false ,
47+ this .isLogCollectionEnabled = false ,
48+ this .isLogFilterEnabled = false ,
3549 });
3650
3751 BugseeConfigState copyWith ({
@@ -40,12 +54,17 @@ final class BugseeConfigState extends Equatable {
4054 bool ? isVideoCaptureEnabled,
4155 bool ? isConfigurationValid,
4256 bool ? isDataObscured,
57+ bool ? isLogCollectionEnabled,
58+ bool ? isLogFilterEnabled,
4359 }) =>
4460 BugseeConfigState (
4561 isRestartRequired: isRestartRequired ?? this .isRestartRequired,
4662 isBugseeEnabled: isBugseeEnabled ?? this .isBugseeEnabled,
4763 isConfigurationValid: isConfigurationValid ?? this .isConfigurationValid,
4864 isDataObscured: isDataObscured ?? this .isDataObscured,
65+ isLogFilterEnabled: isLogFilterEnabled ?? this .isLogFilterEnabled,
66+ isLogCollectionEnabled:
67+ isLogCollectionEnabled ?? this .isLogCollectionEnabled,
4968 isVideoCaptureEnabled:
5069 isVideoCaptureEnabled ?? this .isVideoCaptureEnabled,
5170 );
0 commit comments