mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 消息中心新增浏览器打开,浏览器缩放手势支持
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
@@ -43,7 +45,7 @@ class _WebviewPageState extends State<WebviewPage> {
|
||||
icon: Icon(Icons.open_in_browser_outlined,
|
||||
color: Theme.of(context).colorScheme.primary),
|
||||
),
|
||||
if (_webviewController.type.value == 'login')...<Widget>[
|
||||
if (_webviewController.type.value == 'login') ...<Widget>[
|
||||
TextButton(
|
||||
onPressed: () => _webviewController.confirmLogin(null),
|
||||
child: const Text('刷新登录态'),
|
||||
@@ -83,11 +85,30 @@ class _WebviewPageState extends State<WebviewPage> {
|
||||
color: Theme.of(context).colorScheme.onInverseSurface,
|
||||
padding: const EdgeInsets.only(
|
||||
left: 12, right: 12, top: 6, bottom: 6),
|
||||
child: const Text('如需二维码登录,请点击「电脑版」,放大左侧二维码,截图后官方app或另一设备扫码,授权后点击「刷新登录态」'),
|
||||
child: const Text(
|
||||
'如需二维码登录,请点击「电脑版」,放大左侧二维码,截图后官方app或另一设备扫码,授权后点击「刷新登录态」'),
|
||||
),
|
||||
],
|
||||
Expanded(
|
||||
child: WebViewWidget(controller: _webviewController.controller),
|
||||
child: WebViewWidget(
|
||||
controller: _webviewController.controller,
|
||||
gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>{
|
||||
Factory<VerticalDragGestureRecognizer>(
|
||||
() => VerticalDragGestureRecognizer(),
|
||||
),
|
||||
Factory<PanGestureRecognizer>(
|
||||
() => PanGestureRecognizer(),
|
||||
),
|
||||
Factory<ForcePressGestureRecognizer>(
|
||||
() => ForcePressGestureRecognizer(),
|
||||
),
|
||||
Factory<EagerGestureRecognizer>(
|
||||
() => EagerGestureRecognizer(),
|
||||
),
|
||||
Factory<HorizontalDragGestureRecognizer>(
|
||||
() => HorizontalDragGestureRecognizer(),
|
||||
),
|
||||
}),
|
||||
),
|
||||
],
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user