Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
appframe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 34e1546b
authored
2026-05-30 23:06:06 +0800
by
tanghuan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
openSetting指令支持打开wifi设置界面
1 parent
cec0eb72
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
lib/data/repositories/message/open_setting_handler.dart
lib/data/repositories/message/open_setting_handler.dart
View file @
34e1546
import
'dart:io'
;
import
'dart:io'
;
import
'package:app_settings/app_settings.dart'
;
import
'package:appframe/config/constant.dart'
;
import
'package:appframe/config/constant.dart'
;
import
'package:appframe/config/locator.dart'
;
import
'package:appframe/config/locator.dart'
;
import
'package:appframe/config/routes.dart'
;
import
'package:appframe/config/routes.dart'
;
...
@@ -42,6 +43,7 @@ class OpenSettingHandler extends MessageHandler {
...
@@ -42,6 +43,7 @@ class OpenSettingHandler extends MessageHandler {
'clear'
:
_handleClear
,
'clear'
:
_handleClear
,
'logout'
:
_handleLogout
,
'logout'
:
_handleLogout
,
'vconsole'
:
_handleToggleDebug
,
'vconsole'
:
_handleToggleDebug
,
'wifi'
:
_openWifiSettings
,
};
};
final
handler
=
handlers
[
item
];
final
handler
=
handlers
[
item
];
...
@@ -100,6 +102,15 @@ class OpenSettingHandler extends MessageHandler {
...
@@ -100,6 +102,15 @@ class OpenSettingHandler extends MessageHandler {
return
true
;
return
true
;
}
}
/// 打开系统WIFI设置界面
Future
<
bool
>
_openWifiSettings
()
async
{
await
AppSettings
.
openAppSettings
(
type:
AppSettingsType
.
wifi
,
asAnotherTask:
false
,
);
return
true
;
}
/// 清理缓存
/// 清理缓存
Future
<
void
>
_clearStorage
()
async
{
Future
<
void
>
_clearStorage
()
async
{
// 1 清理 WebView 相关缓存
// 1 清理 WebView 相关缓存
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment