Skip to content

Commit

Permalink
Fix name of InAppWebViewController
Browse files Browse the repository at this point in the history
  • Loading branch information
3003h committed Oct 29, 2024
1 parent 62efa16 commit c1e2d3a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/pages/setting/webview/web_mysetting_in.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class InWebMySetting extends StatelessWidget {
final CookieManager cookieManager = CookieManager.instance();
final EhSettingService ehSettingService = Get.find();

InAppWebViewController? controller;
InAppWebViewController? inAppWebViewController;

final baseUrl = Api.getBaseUrl();

Expand All @@ -41,11 +41,11 @@ class InWebMySetting extends StatelessWidget {
CupertinoButton(
padding: const EdgeInsets.all(0),
child: const Icon(
FontAwesomeIcons.redoAlt,
FontAwesomeIcons.rotateRight,
size: 22,
),
onPressed: () async {
controller?.reload();
inAppWebViewController?.reload();
},
),
CupertinoButton(
Expand All @@ -56,7 +56,7 @@ class InWebMySetting extends StatelessWidget {
),
onPressed: () async {
// 保存配置
controller?.evaluateJavascript(
inAppWebViewController?.evaluateJavascript(
source:
'document.querySelector("#apply > input[type=submit]").click();');
},
Expand All @@ -74,7 +74,7 @@ class InWebMySetting extends StatelessWidget {
),
initialSettings: inAppWebViewSettings,
onWebViewCreated: (InAppWebViewController controller) {
controller = controller;
inAppWebViewController = controller;
},
shouldOverrideUrlLoading: (controller, navigationAction) async {
final uri = navigationAction.request.url!;
Expand Down

0 comments on commit c1e2d3a

Please sign in to comment.