diff --git a/README.md b/README.md index 483bd7b..6cd3c1c 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,8 @@ Future main() async { showSNSButtons: true, // Target the specific environment branch by its name branch: 'branch-name', + // By default, Virtusize shows the Privacy Policy + showShowPrivacyPolicy: true, ); runApp(MyApp()); @@ -165,7 +167,7 @@ Possible argument configuration is shown in the following table: | 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. | | showSNSButtons | bool | true | Determines whether the integration will show the SNS buttons to the users. | No. By default, the integration disables the SNS buttons. | | branch | String | 'branch-name' | Targets specific environment branch. | No. By default, production environment is targeted. `staging` targets staging environment. `` targets a specific branch. | - +| setShowPrivacyPolicy | Boolean | setShowPrivacyPolicy(true) | Controls whether the privacy policy shows to users | No. By default, the privacy policy is shown | #### (2) Load Virtusize with the Product Details In the `initState` of your product page widget, you will need to use `VirtusizeSDK.instance.loadVirtusize` to populate the Virtusize widgets: diff --git a/example/lib/main.dart b/example/lib/main.dart index 9b1d008..4d53db3 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -26,6 +26,8 @@ Future main() async { showSNSButtons: true, // Target the specific environment branch by its name branch: null, + // By default, Virtusize shows the Privacy Policy + showShowPrivacyPolicy: false, ); runApp(MyApp()); diff --git a/lib/src/main.dart b/lib/src/main.dart index b724ce6..c780622 100644 --- a/lib/src/main.dart +++ b/lib/src/main.dart @@ -120,9 +120,8 @@ class VirtusizeSDK { /// Target the specific environment branch by its name String? branch, - //Hide method as for the moment // By default, Virtusize shows the Privacy Policy - //bool? showShowPrivacyPolicy = true, + bool? showShowPrivacyPolicy = true, /// The boolean value to determine whether to use or not services.virtusize.com url bool serviceEnvironment = true, @@ -146,11 +145,11 @@ class VirtusizeSDK { }).toList(), FlutterVirtusizeKey.showSNSButtons: showSNSButtons, FlutterVirtusizeKey.branch: branch, - // FlutterVirtusizeKey.showPrivacyPolicy: showShowPrivacyPolicy, + FlutterVirtusizeKey.showPrivacyPolicy: showShowPrivacyPolicy, FlutterVirtusizeKey.serviceEnvironment: serviceEnvironment, }); - // IVirtusizeSDK.instance._showPrivacyPolicy = showShowPrivacyPolicy; + IVirtusizeSDK.instance._showPrivacyPolicy = showShowPrivacyPolicy; await _loadVSText( paramsData[FlutterVirtusizeKey.displayLanguage],