updateTheme method

dynamic updateTheme({
  1. required EpubTheme theme,
})

Implementation

updateTheme({required EpubTheme theme}) async {
  String? backgroundColor = theme.backgroundColor?.toHex();
  String? foregroundColor = theme.foregroundColor?.toHex();
  await webViewController?.evaluateJavascript(
      source: 'updateTheme("$backgroundColor","$foregroundColor")');
}