setConfig static method
void
setConfig({})
Configure Viewer's with available values
themeColor is the color of the reader scrollDirection uses the EpubScrollDirection enum allowSharing enableTts is an option to enable the inbuilt Text-to-Speech
Implementation
static void setConfig(
{Color themeColor = Colors.blue,
String identifier = 'book',
bool nightMode = false,
EpubScrollDirection scrollDirection = EpubScrollDirection.ALLDIRECTIONS,
bool allowSharing = false,
bool enableTts = false}) async {
Map<String, dynamic> agrs = {
"identifier": identifier,
"themeColor": Util.getHexFromColor(themeColor),
"scrollDirection": Util.getDirection(scrollDirection),
"allowSharing": allowSharing,
'enableTts': enableTts,
'nightMode': nightMode
};
await _channel.invokeMethod('setConfig', agrs);
}