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