diff --git a/.fvmrc b/.fvmrc new file mode 100644 index 0000000..a4c4660 --- /dev/null +++ b/.fvmrc @@ -0,0 +1,3 @@ +{ + "flutter": "3.41.2" +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6f0d006..ac83f76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,45 +1,48 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.build/ -.buildlog/ -.history -.svn/ -.swiftpm/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins-dependencies -.pub-cache/ -.pub/ -/build/ -/coverage/ - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ +/coverage/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release + +# FVM Version Cache +.fvm/ \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..62faa9e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,73 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "web_android_shell", + "request": "launch", + "type": "dart" + }, + { + "name": "quanxue", + "cwd": "apps/quanxue", + "request": "launch", + "type": "dart" + }, + { + "name": "quanxue (profile mode)", + "cwd": "apps/quanxue", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "quanxue (release mode)", + "cwd": "apps/quanxue", + "request": "launch", + "type": "dart", + "flutterMode": "release" + }, + { + "name": "web_android_shell", + "cwd": "packages/web_android_shell", + "request": "launch", + "type": "dart" + }, + { + "name": "web_android_shell (profile mode)", + "cwd": "packages/web_android_shell", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "web_android_shell (release mode)", + "cwd": "packages/web_android_shell", + "request": "launch", + "type": "dart", + "flutterMode": "release" + }, + { + "name": "web_shell_core", + "cwd": "packages/web_shell_core", + "request": "launch", + "type": "dart" + }, + { + "name": "web_shell_core (profile mode)", + "cwd": "packages/web_shell_core", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "web_shell_core (release mode)", + "cwd": "packages/web_shell_core", + "request": "launch", + "type": "dart", + "flutterMode": "release" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c51f252 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.flutterSdkPath": ".fvm/versions/3.41.2" +} \ No newline at end of file diff --git a/apps/quanxue/lib/main.dart b/apps/quanxue/lib/main.dart index 7746930..4de210c 100644 --- a/apps/quanxue/lib/main.dart +++ b/apps/quanxue/lib/main.dart @@ -10,6 +10,7 @@ void main() { backgroundColor: const Color(0xFFFFFFFF), textColor: const Color(0xFF1F2937), mutedTextColor: const Color(0xFF6B7280), + initialUrl: "http://192.168.2.57:8080/test_bridge.html", ), ); } diff --git a/packages/web_shell_core/test_assets/test_bridge.html b/packages/web_shell_core/test_assets/test_bridge.html new file mode 100644 index 0000000..3137771 --- /dev/null +++ b/packages/web_shell_core/test_assets/test_bridge.html @@ -0,0 +1,769 @@ + + + + + +WebShell Core 功能验收测试 + + + + + +
+
+
等待 AppShell 桥接注入…
+
+
+ + +
1. 环境检测
+
+
Bridge 状态
+
+ +
+
点击按钮检测 AppShell Bridge 状态
+
+ + +
2. 核心 WebView 行为
+
+
原生 <a> 标签跳转(非 Bridge)
+ +
HTML5 Geolocation
+
+ + +
+
点击按钮测试 WebView 原生行为
+
+ + +
3. 拍照 captureImage
+
+
响应格式
+
+ + + +
+
拍照结果将在此显示
+
+ + +
4. 图库选图 pickImage
+
+
+ + +
+
选图结果将在此显示
+
+ + +
5. 文件选择 pickFile
+
+
+ + + +
+
文件信息将在此显示
+
+ + +
6. 外部链接 openExternal
+
+
+ + + + +
+
调用结果将在此显示
+
+ + +
7. 权限请求 requestPermissions
+
+
+ + + + +
+
权限状态将在此显示
+
+ + +
8. 页面控制
+
+
+ + + +
+
+ + +
9. 旧相机兼容层 Legacy Camera
+
+
openCamera / capturePhoto 劫持测试
+
+ + + + + +
+
旧相机兼容测试结果将在此显示
+
+ + +
10. 原生 <input type="file">
+
+
+ + + + +
+
通过原生 <input> 选择文件后显示信息
+
+ + +
11. UI 状态观察(手动操作)
+
+
以下由测试人员手动操作并观察壳应用行为:
+ +
+ + +
+
+ 📜 操作日志 (0) + +
+
+
+ + + +