opt: nav/searchbar stream

Closes #648

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-09 17:55:44 +08:00
parent 0ccd15047b
commit 783218429c
9 changed files with 30 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ class _WebviewPageNewState extends State<WebviewPageNew> {
: AppBar(
title: StreamBuilder(
initialData: null,
stream: _titleStream.stream,
stream: _titleStream.stream.distinct(),
builder: (context, snapshot) => Text(
maxLines: 1,
snapshot.hasData ? snapshot.data! : _url,
@@ -93,7 +93,7 @@ class _WebviewPageNewState extends State<WebviewPageNew> {
preferredSize: Size.zero,
child: StreamBuilder(
initialData: 0.0,
stream: _progressStream.stream,
stream: _progressStream.stream.distinct(),
builder: (context, snapshot) => snapshot.data as double < 1
? LinearProgressIndicator(
value: snapshot.data as double,