added scrollbar
This commit is contained in:
parent
4778abef62
commit
0d29f634eb
1 changed files with 88 additions and 81 deletions
|
|
@ -220,88 +220,94 @@ class _NovelWebViewState extends ConsumerState<NovelWebView>
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: SingleChildScrollView(
|
child: Scrollbar(
|
||||||
controller: _scrollController,
|
controller: _scrollController,
|
||||||
physics: const BouncingScrollPhysics(),
|
interactive: true,
|
||||||
child: GestureDetector(
|
child: SingleChildScrollView(
|
||||||
behavior: HitTestBehavior.translucent,
|
controller: _scrollController,
|
||||||
onTap: () {
|
physics: const BouncingScrollPhysics(),
|
||||||
_isViewFunction();
|
child: GestureDetector(
|
||||||
},
|
behavior: HitTestBehavior.translucent,
|
||||||
child: Column(
|
onTap: () {
|
||||||
children: [
|
_isViewFunction();
|
||||||
HtmlWidget(
|
},
|
||||||
htmlContent,
|
child: Column(
|
||||||
customStylesBuilder: (element) {
|
children: [
|
||||||
switch (backgroundColor) {
|
HtmlWidget(
|
||||||
case BackgroundColor.black:
|
htmlContent,
|
||||||
return {
|
customStylesBuilder: (element) {
|
||||||
'background-color': 'black',
|
switch (backgroundColor) {
|
||||||
};
|
case BackgroundColor.black:
|
||||||
default:
|
return {
|
||||||
return {
|
'background-color': 'black',
|
||||||
'background-color': '#F0F0F0',
|
};
|
||||||
};
|
default:
|
||||||
}
|
return {
|
||||||
},
|
'background-color': '#F0F0F0',
|
||||||
onTapUrl: (url) {
|
};
|
||||||
context.push("/mangawebview",
|
}
|
||||||
extra: {'url': url, 'title': url});
|
},
|
||||||
return true;
|
onTapUrl: (url) {
|
||||||
},
|
context.push("/mangawebview", extra: {
|
||||||
renderMode: RenderMode.column,
|
'url': url,
|
||||||
textStyle: TextStyle(
|
'title': url
|
||||||
color: backgroundColor ==
|
});
|
||||||
BackgroundColor.white
|
return true;
|
||||||
? Colors.black
|
},
|
||||||
: Colors.white,
|
renderMode: RenderMode.column,
|
||||||
fontSize: fontSize.toDouble()),
|
textStyle: TextStyle(
|
||||||
),
|
color: backgroundColor ==
|
||||||
Center(
|
BackgroundColor.white
|
||||||
heightFactor: 2,
|
? Colors.black
|
||||||
child: Row(
|
: Colors.white,
|
||||||
mainAxisAlignment:
|
fontSize: fontSize.toDouble()),
|
||||||
MainAxisAlignment.center,
|
|
||||||
spacing: 5,
|
|
||||||
children: [
|
|
||||||
IconButton(
|
|
||||||
padding: const EdgeInsets.all(5),
|
|
||||||
onPressed: () =>
|
|
||||||
pushReplacementMangaReaderView(
|
|
||||||
context: context,
|
|
||||||
chapter: _readerController
|
|
||||||
.getPrevChapter(),
|
|
||||||
),
|
|
||||||
icon: Icon(
|
|
||||||
size: 32,
|
|
||||||
Icons.arrow_back,
|
|
||||||
color: backgroundColor ==
|
|
||||||
BackgroundColor.white
|
|
||||||
? Colors.black
|
|
||||||
: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
IconButton(
|
|
||||||
padding: const EdgeInsets.all(5),
|
|
||||||
onPressed: () =>
|
|
||||||
pushReplacementMangaReaderView(
|
|
||||||
context: context,
|
|
||||||
chapter: _readerController
|
|
||||||
.getNextChapter(),
|
|
||||||
),
|
|
||||||
icon: Icon(
|
|
||||||
size: 32,
|
|
||||||
Icons.arrow_forward,
|
|
||||||
color: backgroundColor ==
|
|
||||||
BackgroundColor.white
|
|
||||||
? Colors.black
|
|
||||||
: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
Center(
|
||||||
],
|
heightFactor: 2,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
spacing: 5,
|
||||||
|
children: [
|
||||||
|
IconButton(
|
||||||
|
padding: const EdgeInsets.all(5),
|
||||||
|
onPressed: () =>
|
||||||
|
pushReplacementMangaReaderView(
|
||||||
|
context: context,
|
||||||
|
chapter: _readerController
|
||||||
|
.getPrevChapter(),
|
||||||
|
),
|
||||||
|
icon: Icon(
|
||||||
|
size: 32,
|
||||||
|
Icons.arrow_back,
|
||||||
|
color: backgroundColor ==
|
||||||
|
BackgroundColor.white
|
||||||
|
? Colors.black
|
||||||
|
: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
padding: const EdgeInsets.all(5),
|
||||||
|
onPressed: () =>
|
||||||
|
pushReplacementMangaReaderView(
|
||||||
|
context: context,
|
||||||
|
chapter: _readerController
|
||||||
|
.getNextChapter(),
|
||||||
|
),
|
||||||
|
icon: Icon(
|
||||||
|
size: 32,
|
||||||
|
Icons.arrow_forward,
|
||||||
|
color: backgroundColor ==
|
||||||
|
BackgroundColor.white
|
||||||
|
? Colors.black
|
||||||
|
: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -527,7 +533,8 @@ class _NovelWebViewState extends ConsumerState<NovelWebView>
|
||||||
flex: 14,
|
flex: 14,
|
||||||
child:
|
child:
|
||||||
Consumer(builder: (context, ref, child) {
|
Consumer(builder: (context, ref, child) {
|
||||||
final currentFontSize = ref.watch(novelFontSizeStateProvider);
|
final currentFontSize =
|
||||||
|
ref.watch(novelFontSizeStateProvider);
|
||||||
return SliderTheme(
|
return SliderTheme(
|
||||||
data: SliderTheme.of(context).copyWith(
|
data: SliderTheme.of(context).copyWith(
|
||||||
overlayShape:
|
overlayShape:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue