Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf2a7c7

Browse files
committed
file
1 parentdfbecfc commitdf2a7c7

File tree

7 files changed

+92
-9
lines changed

7 files changed

+92
-9
lines changed

‎study-ai/myappendpoint/src/main/java/com/bage/my/app/end/point/service/FileService.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
importjava.util.Map;
44

55
importorg.springframework.beans.factory.annotation.Value;
6+
importorg.springframework.stereotype.Component;
67
importorg.springframework.web.multipart.MultipartFile;
78

89
importjava.io.IOException;
@@ -14,6 +15,7 @@
1415

1516
importlombok.extern.slf4j.Slf4j;
1617

18+
@Component
1719
@Slf4j
1820
publicclassFileService {
1921
@Value("${app.update.file-dir:./app-updates}")

‎study-ai/myappflutter/lib/presentation/pages/app_version_page.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ class _AppVersionPageState extends State<AppVersionPage> {
109109
constSizedBox(height:12),
110110
ElevatedButton(
111111
onPressed: () {
112-
// 跳转到更新页面
112+
// 跳转到更新页面,传递整个version对象
113113
Get.toNamed(
114114
AppRoutes.UPDATE,
115-
arguments: {'version': version['version']},
115+
arguments: {'version': version},
116116
);
117117
},
118118
child:Text('update_app'.tr),

‎study-ai/myappflutter/lib/presentation/pages/update_page.dart‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'package:permission_handler/permission_handler.dart'; // 导入权限处
1010
import'dart:io';// 导入IO操作
1111

1212
classUpdatePageextendsStatefulWidget {
13-
finalString version;
13+
finalMap<String,dynamic> version;
1414

1515
constUpdatePage({super.key,requiredthis.version});
1616

@@ -96,7 +96,7 @@ class _UpdatePageState extends State<UpdatePage> {
9696
try {
9797
// 使用HttpClient构建下载URL
9898
final downloadUrl= _httpClient
99-
.buildUri('/app/download/12345',null)
99+
.buildUri('/app/download/${widget.version}',null)
100100
.toString();
101101
LogUtil.info('下载URL: $downloadUrl');
102102

@@ -133,7 +133,7 @@ class _UpdatePageState extends State<UpdatePage> {
133133

134134
// 构建APK下载URL
135135
final downloadUrl= _httpClient
136-
.buildUri('/app/download/12345',null)
136+
.buildUri('/app/download/${widget.version['fileId']}',null)
137137
.toString();
138138

139139
LogUtil.info('APK下载URL: $downloadUrl');
@@ -214,7 +214,9 @@ class _UpdatePageState extends State<UpdatePage> {
214214
@override
215215
Widgetbuild(BuildContext context) {
216216
returnScaffold(
217-
appBar:AppBar(title:Text('${'update_to_version'.tr} ${widget.version}')),
217+
appBar:AppBar(
218+
title:Text('${'update_to_version'.tr} ${widget.version['version']}'),
219+
),
218220
body:Center(
219221
child:Column(
220222
mainAxisAlignment:MainAxisAlignment.center,
@@ -242,7 +244,11 @@ class _UpdatePageState extends State<UpdatePage> {
242244
if (_isDownloading)constCircularProgressIndicator(),
243245
ElevatedButton(
244246
onPressed: _isDownloading?null: _downloadUpdate,
245-
child:Text(_isDownloading?'processing'.tr:'browser_download'.tr),
247+
child:Text(
248+
_isDownloading
249+
?'processing'.tr
250+
:'browser_download'.tr,
251+
),
246252
),
247253
],
248254
),
@@ -306,7 +312,11 @@ class _UpdatePageState extends State<UpdatePage> {
306312
backgroundColor:Colors.green,
307313
foregroundColor:Colors.white,
308314
),
309-
child:Text(_isDownloadingApp?'downloading'.tr:'in_app_download'.tr),
315+
child:Text(
316+
_isDownloadingApp
317+
?'downloading'.tr
318+
:'in_app_download'.tr,
319+
),
310320
),
311321
],
312322
),

‎study-ai/myappflutter/linux/flutter/generated_plugin_registrant.cc‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@
77
#include"generated_plugin_registrant.h"
88

99
#include<file_selector_linux/file_selector_plugin.h>
10+
#include<open_file_linux/open_file_linux_plugin.h>
1011
#include<url_launcher_linux/url_launcher_plugin.h>
1112

1213
voidfl_register_plugins(FlPluginRegistry* registry) {
1314
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
1415
fl_plugin_registry_get_registrar_for_plugin(registry,"FileSelectorPlugin");
1516
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
17+
g_autoptr(FlPluginRegistrar) open_file_linux_registrar =
18+
fl_plugin_registry_get_registrar_for_plugin(registry,"OpenFileLinuxPlugin");
19+
open_file_linux_plugin_register_with_registrar(open_file_linux_registrar);
1620
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
1721
fl_plugin_registry_get_registrar_for_plugin(registry,"UrlLauncherPlugin");
1822
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);

‎study-ai/myappflutter/linux/flutter/generated_plugins.cmake‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
list(APPEND FLUTTER_PLUGIN_LIST
66
file_selector_linux
7+
open_file_linux
78
url_launcher_linux
89
)
910

‎study-ai/myappflutter/macos/Flutter/GeneratedPluginRegistrant.swift‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import FlutterMacOS
66
import Foundation
77

88
import file_selector_macos
9+
import open_file_mac
910
import package_info_plus
1011
import path_provider_foundation
1112
import shared_preferences_foundation
@@ -14,6 +15,7 @@ import video_player_avfoundation
1415

1516
func RegisterGeneratedPlugins(registry:FlutterPluginRegistry){
1617
FileSelectorPlugin.register(with: registry.registrar(forPlugin:"FileSelectorPlugin"))
18+
OpenFilePlugin.register(with: registry.registrar(forPlugin:"OpenFilePlugin"))
1719
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin:"FPPPackageInfoPlusPlugin"))
1820
PathProviderPlugin.register(with: registry.registrar(forPlugin:"PathProviderPlugin"))
1921
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin:"SharedPreferencesPlugin"))

‎study-ai/myappflutter/pubspec.lock‎

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,70 @@ packages:
421421
url: "https://pub.dev"
422422
source: hosted
423423
version: "2.0.0"
424+
open_file:
425+
dependency: "direct main"
426+
description:
427+
name: open_file
428+
sha256: d17e2bddf5b278cb2ae18393d0496aa4f162142ba97d1a9e0c30d476adf99c0e
429+
url: "https://pub.dev"
430+
source: hosted
431+
version: "3.5.10"
432+
open_file_android:
433+
dependency: transitive
434+
description:
435+
name: open_file_android
436+
sha256: "58141fcaece2f453a9684509a7275f231ac0e3d6ceb9a5e6de310a7dff9084aa"
437+
url: "https://pub.dev"
438+
source: hosted
439+
version: "1.0.6"
440+
open_file_ios:
441+
dependency: transitive
442+
description:
443+
name: open_file_ios
444+
sha256: "02996f01e5f6863832068e97f8f3a5ef9b613516db6897f373b43b79849e4d07"
445+
url: "https://pub.dev"
446+
source: hosted
447+
version: "1.0.3"
448+
open_file_linux:
449+
dependency: transitive
450+
description:
451+
name: open_file_linux
452+
sha256: d189f799eecbb139c97f8bc7d303f9e720954fa4e0fa1b0b7294767e5f2d7550
453+
url: "https://pub.dev"
454+
source: hosted
455+
version: "0.0.5"
456+
open_file_mac:
457+
dependency: transitive
458+
description:
459+
name: open_file_mac
460+
sha256: "1440b1e37ceb0642208cfeb2c659c6cda27b25187a90635c9d1acb7d0584d324"
461+
url: "https://pub.dev"
462+
source: hosted
463+
version: "1.0.3"
464+
open_file_platform_interface:
465+
dependency: transitive
466+
description:
467+
name: open_file_platform_interface
468+
sha256: "101b424ca359632699a7e1213e83d025722ab668b9fd1412338221bf9b0e5757"
469+
url: "https://pub.dev"
470+
source: hosted
471+
version: "1.0.3"
472+
open_file_web:
473+
dependency: transitive
474+
description:
475+
name: open_file_web
476+
sha256: e3dbc9584856283dcb30aef5720558b90f88036360bd078e494ab80a80130c4f
477+
url: "https://pub.dev"
478+
source: hosted
479+
version: "0.0.4"
480+
open_file_windows:
481+
dependency: transitive
482+
description:
483+
name: open_file_windows
484+
sha256: d26c31ddf935a94a1a3aa43a23f4fff8a5ff4eea395fe7a8cb819cf55431c875
485+
url: "https://pub.dev"
486+
source: hosted
487+
version: "0.0.3"
424488
package_info_plus:
425489
dependency: "direct main"
426490
description:
@@ -438,7 +502,7 @@ packages:
438502
source: hosted
439503
version: "3.2.1"
440504
path:
441-
dependency:transitive
505+
dependency:"direct main"
442506
description:
443507
name: path
444508
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp