Component Options
The Zappar embed component can be customized with the options outlined below.
Option | Type | Description |
---|---|---|
hostAppData | string | An arbitrary string set by the application and passed into the embed. |
launchDeepLink | string | Sets a ZapWorks experience to launch directly into. For more information see the Deep Links article. |
FullScreen | boolean | Sets whether the component will be started in fullscreen. |
SuppressAnimation | boolean | Sets if all animations will be suppressed. |
barColor | string | Sets the bar color with a hex value. |
History | boolean | Sets whether the History button is shown. |
Favorite | boolean | Sets whether the Favorites button is shown. |
Rescan | boolean | Sets whether the rescan button is shown. |
Photo | boolean | Sets whether the Photo button is shown. |
Gif | boolean | Sets whether the Gif button is shown. |
AgeGate | boolean | Sets whether the age gate message is shown. |
ArWarning | boolean | Sets whether the AR warning is shown (Android only). |
Message | string | Sets a custom variable message. |
ForceLandscape | boolean | Sets whether to force the device to display in landscape orientation. |
The parameters above can be passed to the Zappar embed via key-value pairs with a Map.
The example application provided with your embed contains a Map with the following options passed in.
Example:
Map<String, bool> options = { 'History': true, 'Rescan': true, 'AgeGate': false, 'Favorite': true, 'FullScreen': false, 'ArWarning': false }; Map<String, dynamic> textOptions = {'launchDeepLink': '', 'barColor': '', 'hostAppData': ''};
The options can then be passed into the following start method:
void _showNativeView() async { textOptions.addAll(options); String allJson = jsonEncode(textOptions); var zappar = new Zappar(); await zappar.showNativeView(allJson); }