Changed progress indicator webview
This commit is contained in:
@@ -25,10 +25,6 @@ final List<RouteBase> appRoutes = [
|
||||
path: RoutesPaths.onboarding,
|
||||
builder: (context, state) => const Onboarding(),
|
||||
),
|
||||
GoRoute(
|
||||
path: RoutesPaths.webview,
|
||||
builder: (context, state) => WebView(bookmark: state.extra as Bookmark),
|
||||
),
|
||||
ShellRoute(
|
||||
builder: (context, state, child) => Layout(
|
||||
state: state,
|
||||
@@ -61,4 +57,8 @@ final List<RouteBase> appRoutes = [
|
||||
path: RoutesPaths.generalSettings,
|
||||
builder: (context, state) => const GeneralSettings(),
|
||||
),
|
||||
GoRoute(
|
||||
path: RoutesPaths.webview,
|
||||
builder: (context, state) => WebViewScreen(bookmark: state.extra as Bookmark),
|
||||
),
|
||||
];
|
||||
|
||||
@@ -10,10 +10,10 @@ import 'package:linkdy/i18n/strings.g.dart';
|
||||
import 'package:linkdy/utils/copy_clipboard.dart';
|
||||
import 'package:linkdy/utils/open_url.dart';
|
||||
|
||||
class WebView extends ConsumerWidget {
|
||||
class WebViewScreen extends ConsumerWidget {
|
||||
final Bookmark bookmark;
|
||||
|
||||
const WebView({
|
||||
const WebViewScreen({
|
||||
Key? key,
|
||||
required this.bookmark,
|
||||
}) : super(key: key);
|
||||
@@ -43,9 +43,7 @@ class WebView extends ConsumerWidget {
|
||||
bottom: PreferredSize(
|
||||
preferredSize: const Size(double.maxFinite, 0),
|
||||
child: ref.watch(webViewProvider).loadProgress < 100
|
||||
? LinearProgressIndicator(
|
||||
value: ref.watch(webViewProvider).loadProgress.toDouble(),
|
||||
)
|
||||
? const LinearProgressIndicator()
|
||||
: const SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user