Skip to content

Component Options

The Zappar embed component can be customized with the options outlined below.

OptionTypeDescription
hostAppDatastringAn arbitrary string set by the application and passed into the embed.
launchDeepLinkstringSets a ZapWorks experience to launch directly into. For more information see the Deep Links article.
FullScreenbooleanSets whether the component will be started in fullscreen.
SuppressAnimationbooleanSets if all animations will be suppressed.
barColorstringSets the bar color with a hex value.
HistorybooleanSets whether the History button is shown.
FavoritebooleanSets whether the Favorites button is shown.
RescanbooleanSets whether the rescan button is shown.
PhotobooleanSets whether the Photo button is shown.
GifbooleanSets whether the Gif button is shown.
AgeGatebooleanSets whether the age gate message is shown.
ArWarningbooleanSets whether the AR warning is shown (Android only).
MessagestringSets a custom variable message.
ForceLandscapebooleanSets 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);
}