Commit 86fb6411 by Administrator

关闭 离线的html包的本地解压操作判断

1 parent 4cf1be2f
...@@ -16,16 +16,18 @@ class App extends StatelessWidget { ...@@ -16,16 +16,18 @@ class App extends StatelessWidget {
routerConfig: router, routerConfig: router,
title: '班小二', title: '班小二',
theme: const CupertinoThemeData(primaryColor: CupertinoColors.systemBlue), theme: const CupertinoThemeData(primaryColor: CupertinoColors.systemBlue),
// === 为 iOS 添加本地化配置 === localizationsDelegates: AppLocalizations.localizationsDelegates,
localizationsDelegates: const [ supportedLocales: AppLocalizations.supportedLocales,
GlobalMaterialLocalizations.delegate, // 为Material组件提供本地化 // // === 为 iOS 添加本地化配置 ===
GlobalCupertinoLocalizations.delegate, // 为Cupertino组件提供本地化 // localizationsDelegates: const [
GlobalWidgetsLocalizations.delegate, // 定义文本方向等 // GlobalMaterialLocalizations.delegate, // 为Material组件提供本地化
], // GlobalCupertinoLocalizations.delegate, // 为Cupertino组件提供本地化
supportedLocales: const [ // GlobalWidgetsLocalizations.delegate, // 定义文本方向等
Locale('zh', 'CN'), // 中文(中国) // ],
Locale('en', 'US'), // 英语(美国) // supportedLocales: const [
], // Locale('zh', 'CN'), // 中文(中国)
// Locale('en', 'US'), // 英语(美国)
// ],
) )
: MaterialApp.router( : MaterialApp.router(
localizationsDelegates: AppLocalizations.localizationsDelegates, localizationsDelegates: AppLocalizations.localizationsDelegates,
......
...@@ -157,9 +157,9 @@ class LocalServerService { ...@@ -157,9 +157,9 @@ class LocalServerService {
var outputDirectory = await getHttpDirectory(); var outputDirectory = await getHttpDirectory();
// 判断目录存在则不需要再解压 // 判断目录存在则不需要再解压
if (Directory(outputDirectory).existsSync()) { // if (Directory(outputDirectory).existsSync()) {
return; // return;
} // }
var zipFilePath = "assets/dist.zip"; var zipFilePath = "assets/dist.zip";
final ByteData data = await rootBundle.load(zipFilePath); final ByteData data = await rootBundle.load(zipFilePath);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!