mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-05-19 20:21:54 +00:00
formatted
This commit is contained in:
parent
50eff04fe6
commit
a531e87bda
1 changed files with 29 additions and 23 deletions
|
|
@ -36,13 +36,15 @@ class NovelReaderView extends ConsumerWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
chapter.manga.loadSync();
|
chapter.manga.loadSync();
|
||||||
final source = getSource(chapter.manga.value!.lang!, chapter.manga.value!.source!);
|
final source =
|
||||||
final htmlContent = ref.watch(getHtmlContentProvider(
|
getSource(chapter.manga.value!.lang!, chapter.manga.value!.source!);
|
||||||
source: source!,
|
final htmlContent =
|
||||||
url: chapter.url!
|
ref.watch(getHtmlContentProvider(source: source!, url: chapter.url!));
|
||||||
));
|
|
||||||
|
|
||||||
return NovelWebView(chapter: chapter, htmlContent: htmlContent,);
|
return NovelWebView(
|
||||||
|
chapter: chapter,
|
||||||
|
htmlContent: htmlContent,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -181,23 +183,27 @@ class _NovelWebViewState extends ConsumerState<NovelWebView>
|
||||||
bottom: false,
|
bottom: false,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
widget.htmlContent.when(
|
||||||
child: widget.htmlContent.when(
|
data: (htmlContent) => Expanded(
|
||||||
data: (htmlContent) => SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
child: Html(
|
child: Html(
|
||||||
data: htmlContent,
|
data: htmlContent,
|
||||||
style: {
|
style: {
|
||||||
"*": Style(
|
"*": Style(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
margin: Margins.all(5))
|
margin: Margins.all(5))
|
||||||
},
|
},
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
loading: () => const Center(child: CircularProgressIndicator(),),
|
),
|
||||||
error: (err, stack) => Center(child: Text(err.toString()),)),
|
loading: () => const Center(
|
||||||
),
|
child: CircularProgressIndicator(),
|
||||||
|
),
|
||||||
|
error: (err, stack) => Center(
|
||||||
|
child: Text(err.toString()),
|
||||||
|
)),
|
||||||
_appBar(),
|
_appBar(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue