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 86fb6411
authored
2025-11-04 17:38:42 +0800
by
Administrator
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
关闭 离线的html包的本地解压操作判断
1 parent
4cf1be2f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
lib/app.dart
lib/services/local_server_service.dart
lib/app.dart
View file @
86fb641
...
...
@@ -16,16 +16,18 @@ class App extends StatelessWidget {
routerConfig:
router
,
title:
'班小二'
,
theme:
const
CupertinoThemeData
(
primaryColor:
CupertinoColors
.
systemBlue
),
// === 为 iOS 添加本地化配置 ===
localizationsDelegates:
const
[
GlobalMaterialLocalizations
.
delegate
,
// 为Material组件提供本地化
GlobalCupertinoLocalizations
.
delegate
,
// 为Cupertino组件提供本地化
GlobalWidgetsLocalizations
.
delegate
,
// 定义文本方向等
],
supportedLocales:
const
[
Locale
(
'zh'
,
'CN'
),
// 中文(中国)
Locale
(
'en'
,
'US'
),
// 英语(美国)
],
localizationsDelegates:
AppLocalizations
.
localizationsDelegates
,
supportedLocales:
AppLocalizations
.
supportedLocales
,
// // === 为 iOS 添加本地化配置 ===
// localizationsDelegates: const [
// GlobalMaterialLocalizations.delegate, // 为Material组件提供本地化
// GlobalCupertinoLocalizations.delegate, // 为Cupertino组件提供本地化
// GlobalWidgetsLocalizations.delegate, // 定义文本方向等
// ],
// supportedLocales: const [
// Locale('zh', 'CN'), // 中文(中国)
// Locale('en', 'US'), // 英语(美国)
// ],
)
:
MaterialApp
.
router
(
localizationsDelegates:
AppLocalizations
.
localizationsDelegates
,
...
...
lib/services/local_server_service.dart
View file @
86fb641
...
...
@@ -157,9 +157,9 @@ class LocalServerService {
var
outputDirectory
=
await
getHttpDirectory
();
// 判断目录存在则不需要再解压
if
(
Directory
(
outputDirectory
).
existsSync
())
{
return
;
}
//
if (Directory(outputDirectory).existsSync()) {
//
return;
//
}
var
zipFilePath
=
"assets/dist.zip"
;
final
ByteData
data
=
await
rootBundle
.
load
(
zipFilePath
);
...
...
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