Skip to content

Commit ddde4de

Browse files
Merge pull request #32 from virtusize/Remove-main-config-for-showing-hiding-privacy-policy
Remove optional configuration for show/hide Privacy Policy
2 parents 659ee50 + 92eb841 commit ddde4de

4 files changed

Lines changed: 6 additions & 11 deletions

File tree

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ Future<void> main() async {
146146
showSNSButtons: true,
147147
// Target the specific environment branch by its name
148148
branch: 'branch-name',
149-
// By default, Virtusize shows the Privacy Policy
150-
showShowPrivacyPolicy: true,
151149
);
152150
153151
runApp(MyApp());
@@ -167,8 +165,6 @@ Possible argument configuration is shown in the following table:
167165
| detailsPanelCards | List<`VSInfoCategory`> | [VSInfoCategory.generalFit, VSInfoCategory.brandSizing] | The info categories which will be display in the Product Details tab. Possible categories are: `VSInfoCategory.modelInfo`, `VSInfoCategory.generalFit`, `VSInfoCategory.brandSizing` and `VSInfoCategory.material` | No. By default, the integration displays all the possible info categories in the Product Details tab. |
168166
| showSNSButtons | bool | true | Determines whether the integration will show the SNS buttons to the users. | No. By default, the integration disables the SNS buttons. |
169167
| branch | String | 'branch-name' | Targets specific environment branch. | No. By default, production environment is targeted. `staging` targets staging environment. `<branch-name>` targets a specific branch. |
170-
| setShowPrivacyPolicy | Boolean | setShowPrivacyPolicy(true) | Controls whether the privacy policy shows to users | No. By default, the privacy policy is shown |
171-
172168

173169
#### (2) Load Virtusize with the Product Details
174170

example/lib/main.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Future<void> main() async {
2626
showSNSButtons: true,
2727
// Target the specific environment branch by its name
2828
branch: null,
29-
// By default, Virtusize shows the Privacy Policy
30-
showShowPrivacyPolicy: false,
3129
);
3230

3331
runApp(MyApp());

lib/src/main.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ class VirtusizeSDK {
120120
/// Target the specific environment branch by its name
121121
String? branch,
122122

123+
//Hide method as for the moment
123124
// By default, Virtusize shows the Privacy Policy
124-
bool? showShowPrivacyPolicy = true,
125+
//bool? showShowPrivacyPolicy = true,
125126

126127
/// The boolean value to determine whether to use or not services.virtusize.com url
127128
bool serviceEnvironment = true,
@@ -145,11 +146,11 @@ class VirtusizeSDK {
145146
}).toList(),
146147
FlutterVirtusizeKey.showSNSButtons: showSNSButtons,
147148
FlutterVirtusizeKey.branch: branch,
148-
FlutterVirtusizeKey.showPrivacyPolicy: showShowPrivacyPolicy,
149+
// FlutterVirtusizeKey.showPrivacyPolicy: showShowPrivacyPolicy,
149150
FlutterVirtusizeKey.serviceEnvironment: serviceEnvironment,
150151
});
151152

152-
IVirtusizeSDK.instance._showPrivacyPolicy = showShowPrivacyPolicy;
153+
// IVirtusizeSDK.instance._showPrivacyPolicy = showShowPrivacyPolicy;
153154

154155
await _loadVSText(
155156
paramsData[FlutterVirtusizeKey.displayLanguage],
@@ -286,7 +287,7 @@ class IVirtusizeSDK {
286287
Stream<String> get productErrorStream => _productErrorController.stream;
287288

288289
bool? _showPrivacyPolicy = true;
289-
bool? get showPrivacyPolicy => _showPrivacyPolicy;
290+
bool get showPrivacyPolicy => _showPrivacyPolicy ?? true;
290291

291292
IVirtusizeSDK._();
292293

lib/src/widgets/virtusize_inpage_standard.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class _VirtusizeInPageStandardState extends State<VirtusizeInPageStandard> {
6666
void initState() {
6767
super.initState();
6868

69-
_showPrivacyPolicy = IVirtusizeSDK.instance.showPrivacyPolicy ?? true;
69+
_showPrivacyPolicy = IVirtusizeSDK.instance.showPrivacyPolicy;
7070

7171
_vsTextSubscription = IVirtusizeSDK.instance.vsTextStream.listen((vsText) {
7272
_vsText = vsText;

0 commit comments

Comments
 (0)