Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ Future<void> 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());
Expand All @@ -167,8 +165,6 @@ 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. `<branch-name>` 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

Expand Down
2 changes: 0 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ Future<void> 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());
Expand Down
9 changes: 5 additions & 4 deletions lib/src/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ 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,
Expand All @@ -145,11 +146,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],
Expand Down Expand Up @@ -286,7 +287,7 @@ class IVirtusizeSDK {
Stream<String> get productErrorStream => _productErrorController.stream;

bool? _showPrivacyPolicy = true;
bool? get showPrivacyPolicy => _showPrivacyPolicy;
bool get showPrivacyPolicy => _showPrivacyPolicy ?? true;

IVirtusizeSDK._();

Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/virtusize_inpage_standard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class _VirtusizeInPageStandardState extends State<VirtusizeInPageStandard> {
void initState() {
super.initState();

_showPrivacyPolicy = IVirtusizeSDK.instance.showPrivacyPolicy ?? true;
_showPrivacyPolicy = IVirtusizeSDK.instance.showPrivacyPolicy;

_vsTextSubscription = IVirtusizeSDK.instance.vsTextStream.listen((vsText) {
_vsText = vsText;
Expand Down