File tree Expand file tree Collapse file tree 14 files changed +117
-13
lines changed
Expand file tree Collapse file tree 14 files changed +117
-13
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,14 @@ image_picker_macos=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.
1414image_picker_windows=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\image_picker_windows-0.2.1+1\\
1515path_provider_linux=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_linux-2.0.0\\
1616path_provider_windows=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_windows-2.1.7\\
17+ screen_retriever=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\screen_retriever-0.2.0\\
18+ screen_retriever_linux=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\screen_retriever_linux-0.2.0\\
19+ screen_retriever_macos=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\screen_retriever_macos-0.2.0\\
20+ screen_retriever_windows=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\screen_retriever_windows-0.2.0\\
1721shared_preferences=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\shared_preferences-2.3.2\\
1822shared_preferences_android=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\shared_preferences_android-2.3.2\\
1923shared_preferences_foundation=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\shared_preferences_foundation-2.5.4\\
2024shared_preferences_linux=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\shared_preferences_linux-2.4.1\\
2125shared_preferences_web=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\shared_preferences_web-2.4.3\\
2226shared_preferences_windows=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\shared_preferences_windows-2.4.1\\
27+ window_manager=C:\\Users\\samuioto\\AppData\\Local\\Pub\\Cache\\git\\window_manager-625d44d2746bfbf1e843321b066d8e9f77951e05\\packages\\window_manager\\
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ A lightweight SSH connection tool based on flutter
33# todo
44* SFTP
55* 极端情况下的overflow
6+ > * Problem: flutter3.22.1-ohos不兼容window_manager,无法限制窗口大小
7+ > * Plan: 独立ohos分支
68# harmonyos端迁移
79* 初步完成,但疑似ohos和其他端的源代码无法兼容,待上述问题解决后在新的分支修复
810* 问题:
Original file line number Diff line number Diff line change 1+ import 'dart:io' ;
12import 'package:flutter/material.dart' ;
23import 'main_page.dart' ;
34
45void main () {
6+ WidgetsFlutterBinding .ensureInitialized ();
7+ if (Platform .isWindows || Platform .isMacOS || Platform .isLinux) {
8+
9+ }
10+
511 runApp (const MyApp ());
612}
713
@@ -14,14 +20,14 @@ class MyApp extends StatelessWidget {
1420 title: '' ,
1521 theme: ThemeData (
1622 colorScheme: ColorScheme .fromSeed (
17- seedColor: Colors .deepPurple ,
23+ seedColor: Colors .blueAccent ,
1824 brightness: Brightness .light,
1925 ),
2026 useMaterial3: true ,
2127 ),
2228 darkTheme: ThemeData (
2329 colorScheme: ColorScheme .fromSeed (
24- seedColor: Colors .deepPurple ,
30+ seedColor: Colors .blueAccent ,
2531 brightness: Brightness .dark,
2632 ),
2733 useMaterial3: true ,
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ class _MainPageState extends State<MainPage> {
256256 vertical: 8 ,
257257 ),
258258 onTap: () {
259- _connectToServer (connection);
259+ // _connectToServer(connection);
260260 },
261261 );
262262 }
@@ -424,7 +424,6 @@ class _MainPageState extends State<MainPage> {
424424 ),
425425 const SizedBox (height: 16 ),
426426
427- // 管理认证凭证按钮
428427 buildButton (
429428 onPressed: () {
430429 Navigator .push (
@@ -444,8 +443,14 @@ class _MainPageState extends State<MainPage> {
444443 showAboutDialog (
445444 context: context,
446445 applicationName: 'connecter' ,
447- applicationVersion: '1.0 Beta' ,
448-
446+ applicationVersion: '0.2 Beta' ,
447+ children: const [
448+ SizedBox (height: 8 ),
449+ Text (
450+ '尚在测试中~期待反馈喵' ,
451+ style: TextStyle (fontSize: 13 ,color: Colors .grey),
452+ )
453+ ]
449454 );
450455 },
451456 title: '关于' ,
Original file line number Diff line number Diff line change @@ -124,9 +124,12 @@ void _connectTo(ConnectionInfo connection) async {
124124 appBar: AppBar (
125125 title: const Text ('管理连接' ),
126126 actions: [
127- IconButton (
128- onPressed: _showNewConnectionDialog,
129- icon: const Icon (Icons .add),
127+ Container (
128+ margin: const EdgeInsets .only (right: 10 ),
129+ child: IconButton (
130+ onPressed: _showNewConnectionDialog,
131+ icon: const Icon (Icons .add),
132+ ),
130133 ),
131134 ],
132135 ),
Original file line number Diff line number Diff line change 77#include " generated_plugin_registrant.h"
88
99#include < file_selector_linux/file_selector_plugin.h>
10+ #include < screen_retriever_linux/screen_retriever_linux_plugin.h>
11+ #include < window_manager/window_manager_plugin.h>
1012
1113void fl_register_plugins (FlPluginRegistry* registry) {
1214 g_autoptr (FlPluginRegistrar) file_selector_linux_registrar =
1315 fl_plugin_registry_get_registrar_for_plugin (registry, " FileSelectorPlugin" );
1416 file_selector_plugin_register_with_registrar (file_selector_linux_registrar);
17+ g_autoptr (FlPluginRegistrar) screen_retriever_linux_registrar =
18+ fl_plugin_registry_get_registrar_for_plugin (registry, " ScreenRetrieverLinuxPlugin" );
19+ screen_retriever_linux_plugin_register_with_registrar (screen_retriever_linux_registrar);
20+ g_autoptr (FlPluginRegistrar) window_manager_registrar =
21+ fl_plugin_registry_get_registrar_for_plugin (registry, " WindowManagerPlugin" );
22+ window_manager_plugin_register_with_registrar (window_manager_registrar);
1523}
Original file line number Diff line number Diff line change 44
55list (APPEND FLUTTER_PLUGIN_LIST
66 file_selector_linux
7+ screen_retriever_linux
8+ window_manager
79)
810
911list (APPEND FLUTTER_FFI_PLUGIN_LIST
Original file line number Diff line number Diff line change @@ -6,9 +6,13 @@ import FlutterMacOS
66import Foundation
77
88import file_selector_macos
9+ import screen_retriever_macos
910import shared_preferences_foundation
11+ import window_manager
1012
1113func RegisterGeneratedPlugins( registry: FlutterPluginRegistry ) {
1214 FileSelectorPlugin . register ( with: registry. registrar ( forPlugin: " FileSelectorPlugin " ) )
15+ ScreenRetrieverMacosPlugin . register ( with: registry. registrar ( forPlugin: " ScreenRetrieverMacosPlugin " ) )
1316 SharedPreferencesPlugin . register ( with: registry. registrar ( forPlugin: " SharedPreferencesPlugin " ) )
17+ WindowManagerPlugin . register ( with: registry. registrar ( forPlugin: " WindowManagerPlugin " ) )
1418}
Original file line number Diff line number Diff line change 11{
22 "modelVersion" : "5.1.0" ,
3- "name" : "t_samuioto_ssh " ,
3+ "name" : "Connecter " ,
44 "version" : "1.0.0" ,
5- "description" : "Please describe the basic information ." ,
5+ "description" : "A lightweight SSH tool ." ,
66 "main" : "" ,
77 "author" : "" ,
88 "license" : "" ,
Original file line number Diff line number Diff line change @@ -290,6 +290,14 @@ packages:
290290 url: "https://pub.dev"
291291 source: hosted
292292 version: "0.6.3"
293+ json_annotation:
294+ dependency: transitive
295+ description:
296+ name: json_annotation
297+ sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
298+ url: "https://pub.dev"
299+ source: hosted
300+ version: "4.9.0"
293301 leak_tracker:
294302 dependency: transitive
295303 description:
@@ -450,6 +458,46 @@ packages:
450458 url: "https://pub.dev"
451459 source: hosted
452460 version: "3.2.2"
461+ screen_retriever:
462+ dependency: transitive
463+ description:
464+ name: screen_retriever
465+ sha256: "570dbc8e4f70bac451e0efc9c9bb19fa2d6799a11e6ef04f946d7886d2e23d0c"
466+ url: "https://pub.dev"
467+ source: hosted
468+ version: "0.2.0"
469+ screen_retriever_linux:
470+ dependency: transitive
471+ description:
472+ name: screen_retriever_linux
473+ sha256: f7f8120c92ef0784e58491ab664d01efda79a922b025ff286e29aa123ea3dd18
474+ url: "https://pub.dev"
475+ source: hosted
476+ version: "0.2.0"
477+ screen_retriever_macos:
478+ dependency: transitive
479+ description:
480+ name: screen_retriever_macos
481+ sha256: "71f956e65c97315dd661d71f828708bd97b6d358e776f1a30d5aa7d22d78a149"
482+ url: "https://pub.dev"
483+ source: hosted
484+ version: "0.2.0"
485+ screen_retriever_platform_interface:
486+ dependency: transitive
487+ description:
488+ name: screen_retriever_platform_interface
489+ sha256: ee197f4581ff0d5608587819af40490748e1e39e648d7680ecf95c05197240c0
490+ url: "https://pub.dev"
491+ source: hosted
492+ version: "0.2.0"
493+ screen_retriever_windows:
494+ dependency: transitive
495+ description:
496+ name: screen_retriever_windows
497+ sha256: "449ee257f03ca98a57288ee526a301a430a344a161f9202b4fcc38576716fe13"
498+ url: "https://pub.dev"
499+ source: hosted
500+ version: "0.2.0"
453501 shared_preferences:
454502 dependency: "direct main"
455503 description:
@@ -615,6 +663,15 @@ packages:
615663 url: "https://pub.dev"
616664 source: hosted
617665 version: "4.1.4"
666+ window_manager:
667+ dependency: "direct main"
668+ description:
669+ path: "packages/window_manager"
670+ ref: HEAD
671+ resolved-ref: "625d44d2746bfbf1e843321b066d8e9f77951e05"
672+ url: "https://github.com/leanflutter/window_manager.git"
673+ source: git
674+ version: "0.5.1"
618675 xdg_directories:
619676 dependency: transitive
620677 description:
You can’t perform that action at this time.
0 commit comments