setConfig static method

void setConfig({
  1. String identifier = 'EpubKitty',
  2. Color themeColor = Colors.black,
  3. EKScrollDirection? scrollDirection = EKScrollDirection.vertical,
  4. bool allowSharing = true,
  5. bool shouldHideNavigationOnTap = false,
})

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);
}