<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Flutter3-MacOS桌面OS系統|flutter3.32+window_manager客戶端OS模板

      原創flutter3.32+dart3.8+window_manager桌面OS解決方案Flutter3MacOS

      flutter3_macos最新研發flutter3.32+dart3.8+getx+window_manager+reorderables客戶端os管理系統模板。支持macOSwindows兩種桌面布局風格、毛玻璃虛化背景、桌面柵格布局模板、Dock菜單可拖拽排序、自定義JSON配置桌面/dock菜單

      未標題-1

      Electron38-Vue3OS客戶端OS系統|vite7+electron38+arco桌面os后臺管理

      技術棧

      • 編輯器:VScode
      • 框架技術:Flutter3.32+Dart3.8
      • 窗口管理:window_manager^0.5.1
      • 路由/狀態管理:get^4.7.2
      • 緩存服務:get_storage^2.1.1
      • 拖拽排序:reorderables^0.6.0
      • 圖表組件:fl_chart^1.0.0
      • 托盤管理:system_tray^2.0.3
      • 日歷插件:syncfusion_flutter_calendar^30.1.42

      p1

      p3

      項目特性

      1. 支持macos/windows兩種桌面風格
      2. 經典程序塢Dock菜單(可拖拽排序/二級菜單)
      3. 支持自定義json配置桌面菜單和Dock菜單
      4. 自研桌面柵格化布局模板
      5. 自定義桌面個性化壁紙、全場景毛玻璃虛化UI質感
      6. 支持自定義彈窗加載頁面組件(支持全屏/拖拽/縮放)

      p4-1

      項目結構目錄

      flutter-macos使用最新版跨平臺框架 flutter3.32+dart3.8 搭建項目模板。

      360截圖20250802105559397

      003360截圖20250801214536046

      flutter3-macOS已經同步到我的原創作品集,有需要的可以去下載使用。

      flutter3.32+window_manager桌面端OS管理系統

      項目入口文件main.dart

      import 'dart:io';
      import 'package:flutter/material.dart';
      import 'package:get/get.dart';
      import 'package:get_storage/get_storage.dart';
      import 'package:intl/date_symbol_data_local.dart';
      import 'package:system_tray/system_tray.dart';
      import 'package:window_manager/window_manager.dart';
      
      import 'utils/common.dart';
      
      // 引入布局模板
      import 'layouts/desktop.dart';
      
      // 引入路由管理
      import 'router/index.dart';
      
      void main() async {
        // 初始化國際化語言
        initializeDateFormatting();
      
        // 初始化get_storage本地存儲
        await GetStorage.init();
      
        // 初始化window_manager窗口
        WidgetsFlutterBinding.ensureInitialized();
        await windowManager.ensureInitialized();
        WindowOptions windowOptions = const WindowOptions(
          title: 'Flutter-MacOS',
          size: Size(1000, 640),
          center: true,
          backgroundColor: Colors.transparent,
          skipTaskbar: false,
          titleBarStyle: TitleBarStyle.hidden, // 是否隱藏系統導航欄
          windowButtonVisibility: false,
        );
        windowManager.waitUntilReadyToShow(windowOptions, () async {
          windowManager.setAsFrameless(); // 無邊框
          windowManager.setHasShadow(true); // 是否有陰影
          await windowManager.show();
          await windowManager.focus();
        });
      
        await initSystemTray();
      
        runApp(const MyApp());
      }
      
      // 初始化系統托盤圖標
      Future<void> initSystemTray() async {
        String trayIco = 'assets/images/tray.ico';
        SystemTray systemTray = SystemTray();
      
        // 初始化系統托盤
        await systemTray.initSystemTray(
          title: 'Flutter-MacOS',
          iconPath: trayIco,
        );
      
        // 右鍵菜單
        final Menu menu = Menu();
        await menu.buildFrom([
          MenuItemLabel(label: '打開主界面', image: 'assets/images/tray_main.bmp', onClicked: (menuItem) async => await windowManager.show()),
          MenuItemLabel(label: '隱藏窗口', image: 'assets/images/tray_hide.bmp', onClicked: (menuItem) async => await windowManager.hide()),
          MenuItemLabel(label: '設置中心', image: 'assets/images/tray_setting.bmp', onClicked: (menuItem) => {}),
          MenuItemLabel(label: '鎖屏', image: 'assets/images/tray_lock.bmp', onClicked: (menuItem) => {}),
          MenuItemLabel(label: '退出', image: 'assets/images/tray_logout.bmp', onClicked: (menuItem) async => await windowManager.destroy()),
        ]);
        await systemTray.setContextMenu(menu);
      
        // 右鍵事件
        systemTray.registerSystemTrayEventHandler((eventName) async {
          debugPrint('eventName: $eventName');
          if (eventName == kSystemTrayEventClick) {
            Platform.isWindows ? await windowManager.show() : systemTray.popUpContextMenu();
          } else if (eventName == kSystemTrayEventRightClick) {
            Platform.isWindows ? systemTray.popUpContextMenu() : await windowManager.show();
          }
        });
      }
      
      class MyApp extends StatelessWidget {
        const MyApp({super.key});
      
        @override
        Widget build(BuildContext context) {
          return GetMaterialApp(
            title: 'FLUTTER3 MACOS',
            debugShowCheckedModeBanner: false,
            // 配置主題
            theme: ThemeData(
              colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),
              useMaterial3: true,
              // 修復windows端字體粗細不一致
              fontFamily: Platform.isWindows ? 'Microsoft YaHei' : null,
            ),
            home: const Desktop(),
            // 初始路由
            initialRoute: Common.isLogin() ? '/' : '/login',
            // 路由頁面
            getPages: routePages,
          );
        }
      }

      未標題-3-1

      007360截圖20250801223052965

      flutter-macos桌面布局模板

      項目內置了macos+windows兩種風格桌面布局模板。

      image

      image

      return Scaffold(
        key: scaffoldKey,
        body: Obx(() {
          return Container(
            // 背景圖主題
            decoration: skinController.skinUrl.isNotEmpty ? BoxDecoration(
              image: DecorationImage(
                image: AssetImage('${skinController.skinUrl}'),
                fit: BoxFit.cover,
              ),
            )
            :
            // 默認漸變色
            BoxDecoration(
              gradient: LinearGradient(
                begin: Alignment.topLeft,
                end: Alignment.bottomRight,
                colors: [Color(0xFF454ED4), Color(0xFFBC40D4)],
              ),
            ),
            child: DragToResizeArea(
              child: Flex(
                direction: Axis.vertical,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  // 頂部模塊
                  widget.header ?? WindowTitlebar(
                    onDrawer: () {
                      scaffoldKey.currentState?.openEndDrawer();
                    },
                  ),
      
                  // 桌面模塊
                  Expanded(
                    child: widget.body ?? Container(),
                  ),
      
                  // 底部模塊
                  Container(
                    child: widget.footer,
                  ),
                ],
              ),
            ),
          );
        }),
      );

      image

      image

      桌面布局模板

      class _DesktopState extends State<Desktop> {
        SettingController settingController = Get.put(SettingController());
      
        @override
        Widget build(BuildContext context) {
          return Obx(() {
            final layout = settingController.settingData['dock'];
            return Layout(
              // 桌面菜單
              body: layout == 'macos' ? MacDesktop() : WindowDesktop(),
              // 底部導航
              footer: layout == 'macos' ? MacDock() : WindowDock(),
            );
          });
        }
      }

      001360截圖20250801213501002

      001360截圖20250801213807377

      004360截圖20250801214826601

      002360截圖20250801214100167

      003360截圖20250801214746607

      004360截圖20250801215121471

      004360截圖20250801215144601

      004360截圖20250801215158532

      004360截圖20250801215231784

      005360截圖20250801220034385

      007360截圖20250801222947313

      007360截圖20250801223052961

      007360截圖20250801224104515

      004360截圖20250801214826609

      image

      桌面菜單JSON配置參數

      /**
        * ================== 桌面OS菜單配置 ==================
        * [label]  圖標標題
        * [imgico] 圖標(本地或網絡圖片) 支持Icon圖標、自定義組件、svg/png...類型
        * [path]   跳轉路由頁面
        * [link]   跳轉外部鏈接
        * [hideLabel]  是否隱藏圖標標題
        * [background] 自定義圖標背景色
        * [size] 柵格磁貼布局(1x1 ... 12x12)
        * [onClick]  點擊圖標回調函數
        * children 二級菜單
        */

      image

      image

      桌面菜單JSON配置片段

      late List deskMenus = [
        {
          'uid': '6c84fb90-12c4-11e1-840d-7b25c5ee775a',
          'label': '主頁',
          'list': [
            {'label': '今日', 'imgico': const Today(), 'hideLabel': true, 'size': '3x2'},
            {'label': '日歷', 'imgico': const Calendar2x2(), 'size': '2x2'},
            {
              'label': '便簽', 'imgico': const Notebook(), 'size': '3x2',
              'onClick': () => {
                navigator?.push(FdialogRoute(
                  child: Fdialog(
                    title: Text('便簽'),
                    content: Center(
                      child: Column(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: [
                          Icon(Icons.turned_in_not_rounded, color: Colors.black26, size: 40.0,),
                          Text('自定義便簽', style: TextStyle(color: Colors.black38),)
                        ],
                      )
                    ),
                    width: 375,
                    height: 400,
                    maximizable: true,
                    resizeable: true,
                  ),
                ))
              }
            },
            {'label': '備忘錄', 'imgico': const Note(), 'size': '2x2'},
            {'label': '倒計時', 'imgico': const Countdown(), 'size': '2x2'},
      
            // ...
          ]
        },
        // ...
        {
          'uid': '9a16fb90-12c4-11e1-840d-7b25c5ee775a',
          'label': '摸魚',
          'list': [
            {'label': 'Flutter3.32', 'imgico': 'assets/images/logo.png', 'link': 'https://flutter.dev/', 'background': Color(0xFFEAFAFF), 'size': '2x2'},
            {'label': 'Github', 'imgico': 'assets/images/svg/github.svg', 'link': 'https://github.com/', 'background': Color(0xff607d8b),},
            {'label': '掘金', 'imgico': 'assets/images/svg/juejin.svg', 'link': 'https://juejin.cn/', 'background': Color(0xff0984fe), 'size': '1x2'},
            {'label': '嗶哩嗶哩', 'imgico': 'assets/images/svg/bilibili.svg', 'link': 'https://www.bilibili.com/', 'background': Color(0xfffe65a6), 'size': '3x2'},
            // ...
          ]
        },
        {
          'uid': 'u738f210-807e-1e4e-1550-4deefac27e48',
          'label': 'AI',
          'list': [
            {'label': 'DeepSeek', 'imgico': 'https://www.faxianai.com/wp-content/uploads/2025/02/20250205134524-1febd.png', 'link': 'https://chat.deepseek.com/', 'hideLabel': true, 'background': Color(0xffffffff), 'size': '3x2'},
            {'label': '騰訊元寶', 'imgico': 'https://www.faxianai.com/wp-content/uploads/2025/02/20250224143149-7fe1f.png', 'link': 'https://yuanbao.tencent.com/', 'background': Color(0xffffffff), 'size': '2x2'},
            // ...
          ]
        },
        {
          'uid': '3u85fb90-12c4-11e1-840d-7b25c5ee775a',
          'label': '工作臺',
          'list': [
            {'label': 'Flutter\n3.22', 'imgico': Padding(padding: EdgeInsets.all(5.0), child: Image.asset('assets/images/logo.png'),), 'link': 'https://flutter.dev/', 'background': Color(0xffffffff), 'size': '2x1'},
            {'label': 'Dart中文官方文檔', 'imgico': 'assets/images/dart.png', 'link': 'https://dart.cn/'},
            {'label': '日歷', 'imgico': const Calendar1x1(), 'background': const Color(0xffffffff),},
            {'label': '首頁', 'imgico': const Icon(Icons.home_outlined), 'path': '/home'},
            {'label': '工作臺', 'imgico': const Icon(Icons.poll_outlined), 'path': '/dashboard'},
            {
              'label': '組件',
              'children': [
                {'label': '組件', 'imgico': 'assets/images/svg/component.svg', 'path': '/component'},
                {'label': '表單管理', 'imgico': 'assets/images/svg/form.svg', 'path': '/form'},
                {'label': '表格', 'imgico': 'assets/images/svg/table.svg', 'path': '/table'},
                {'label': '訂單', 'imgico': 'assets/images/svg/order.svg', 'path': '/order'},
                {'label': 'Editor', 'imgico': 'assets/images/svg/editor.svg', 'path': '/editor'},
              ]
            },
            {
              'label': '管理中心',
              'children': [
                {
                  'label': '個人空間', 'imgico': 'assets/images/svg/my.svg',
                  'onClick': () => {
                    // ...
                  }
                },
                {'label': '用戶管理', 'imgico': 'assets/images/svg/user.svg', 'path': '/user'},
                {'label': '權限設置', 'imgico': 'assets/images/svg/role.svg', 'path': '/role'},
                {'label': '日志', 'imgico': 'assets/images/svg/logs.svg', 'path': '/logs'},
                {'label': '設置', 'imgico': 'assets/images/svg/settings.svg', 'path': '/setting'},
              ]
            },
            {
              'label': '編程開發',
              'children': [
                {'label': 'Flutter', 'imgico': 'assets/images/logo.png', 'link': 'https://flutter.dev/', 'background': const Color(0xFFDAF2FA),},
                {'label': 'DeepSeek深度求索', 'imgico': 'https://www.faxianai.com/wp-content/uploads/2025/02/20250205134524-1febd.png', 'link': 'https://chat.deepseek.com/', 'background': Color(0xffffffff), 'size': '2x1'},
                // ...
              ]
            },
            {
              'label': '關于', 'imgico': const Icon(Icons.info),
              'onClick': () => {
                // ...
              }
            },
            {
              'label': '公眾號', 'imgico': const Icon(Icons.qr_code),
              'onClick': () => {
                // ...
              }
            },
          ]
        }
      ];

      桌面Dock菜單

      image

      image

      桌面Dock菜單配置參數

      /**
        * ================== 桌面dock菜單配置項 ==================
        * [label]  圖標標題
        * [imgico] 圖標(本地或網絡圖片) 支持Icon圖標、自定義組件、svg/png...類型
        * [path]   跳轉路由頁面
        * [link]   跳轉外部鏈接
        * [active] 激活圓點
        * [onClick]  點擊圖標回調函數
        * children 二級菜單
        */

      以上就是flutter3.32搭建跨平臺仿macOS+windows桌面端os系統的一些知識分享,希望對大家有所幫助!

      vite7-webos網頁版os管理|Vue3+Vite7+ArcoDesign搭建pc端os后臺系統

      附上幾個最新項目實例

      Electron38-Wechat電腦端聊天|vite7+electron38仿微信桌面端聊天系統

      electron38-admin桌面端后臺|Electron38+Vue3+ElementPlus管理系統

      最新研發flutter3.27+bitsdojo_window+getx客戶端仿微信聊天Exe應用

      最新版Flutter3.32+Dart3.8跨平臺仿微信app聊天界面|朋友圈

      最新版uniapp+vue3+uv-ui跨三端短視頻+直播+聊天【H5+小程序+App端】

      Uniapp-DeepSeek跨三端AI助手|uniapp+vue3+deepseek-v3流式ai聊天模板

      vue3-webseek網頁版AI問答|Vite6+DeepSeek+Arco流式ai聊天打字效果

      flutter3-dymall仿抖音直播商城|Flutter3.27短視頻+直播+聊天App實例

      Tauri2.0-Vue3OS桌面端os平臺|tauri2+vite6+arco電腦版OS管理系統

      Tauri2.0+Vite5聊天室|vue3+tauri2+element-plus仿微信|tauri聊天應用

      uniapp+vue3聊天室|uni-app+vite4+uv-ui跨端仿微信app聊天語音/朋友圈

      s13.sinaimg

       

      posted @ 2025-08-02 11:38  xiaoyan2017  閱讀(455)  評論(0)    收藏  舉報
      友情鏈接: UP主小店B站
      主站蜘蛛池模板: 免费可以在线看a∨网站| 霍州市| 国产精品成人亚洲一区二区| 日本一道一区二区视频| 美女自卫慰黄网站| 日日猛噜噜狠狠扒开双腿小说| 九九九精品成人免费视频小说| 嫩b人妻精品一区二区三区| 久久国产精品老人性| 无码av永久免费专区麻豆| 友谊县| 中文字幕日韩人妻一区| 亚洲AV无码不卡在线播放| 在线免费播放av日韩| 亚洲精品一区二区三区小| 无码人妻丰满熟妇奶水区码| 最新精品国产自偷在自线| 少妇人妻偷人精品系列| 久热伊人精品国产中文| 国产精品福利自产拍在线观看| 亚洲综合小说另类图片五月天| 亚洲情色av一区二区| 2021最新国产精品网站| 粉嫩一区二区三区精品视频| 中文字幕日韩有码av| 亚洲欧美中文日韩V在线观看| 日韩欧美国产aⅴ另类| 亚洲香蕉伊综合在人在线| 精品日韩色国产在线观看| 国产日韩一区二区在线| 日韩幕无线码一区中文| 精品少妇av蜜臀av| 好吊妞人成视频在线观看| 国产精品视频一区二区不卡| 精品人妻少妇一区二区三区在线| 国产成人综合亚洲欧美日韩 | 亚洲中文字幕第二十三页| 国产农村妇女毛片精品久久| 夜色福利站WWW国产在线视频| 久久av无码精品人妻出轨| 日韩在线一区二区每天更新|