setConfig static method
void
setConfig({
- String identifier = 'EpubKitty',
- Color themeColor = Colors.black,
- EKScrollDirection? scrollDirection = EKScrollDirection.vertical,
- bool allowSharing = true,
Set configurations for EpubKitty library
identifier
- unique key for epub
themeColor
- Theme color for the plugin
scrollDirection
- Scroll direction of reader
allowSharing
- Allow sharing of book quotes
shouldHideNavigationOnTap
(optional)
Implementation
static void setConfig({
String identifier = 'EpubKitty',
Color themeColor = Colors.black,
EKScrollDirection? scrollDirection = EKScrollDirection.vertical,
bool allowSharing = true,
bool shouldHideNavigationOnTap = false,
}) async {
Map<String, dynamic> agrs = {
"identifier": identifier,
"themeColor": '#${themeColor.value.toRadixString(16)}',
"scrollDirection": scrollDirection?.stringValue,
"allowSharing": allowSharing,
"shouldHideNavigationOnTap": shouldHideNavigationOnTap,
};
await _channel.invokeMethod('setConfig', agrs);
}