Files
Frontend Developer 9ca99a1fe1 GC-UI:前后端分离,前端改用 Flutter(Windows/macOS)
- 新增 GC-UI/:backend(.NET 8 本地 HTTP API + 模型窗口宿主)与 frontend(Flutter 桌面应用)
- 前端一套 Dart 代码 + windows/macos 两个原生 runner,共享全部界面逻辑
- 「关于」页新增「源码语言:C#」「前端:Flutter」两行,字段由 /api/about 下发
- 截图脚本覆盖首页/下载/设置/关于/外壳,需要真实后端时用 runAsync 等待请求
- README 补充平台选型理由、接口列表与截图用法
2026-11-17 13:48:17 +00:00

41 lines
1.0 KiB
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:flutter/material.dart';
import 'controller.dart';
import 'i18n.dart';
import 'shell.dart';
import 'theme.dart';
void main() {
runApp(const GcUiApp());
}
/// GC-UI 前端:Flutter 桌面应用(Windows / macOS)。
///
/// 界面全部在这里;模型扫描、下载、更新、设置、模型窗口宿主都在后端
/// (GC-UI/backend/GC.UI.Server,本地 HTTP 服务)。
class GcUiApp extends StatefulWidget {
const GcUiApp({super.key});
@override
State<GcUiApp> createState() => _GcUiAppState();
}
class _GcUiAppState extends State<GcUiApp> {
final ShellController _controller = ShellController();
@override
Widget build(BuildContext context) {
return ValueListenableBuilder<String>(
valueListenable: I18n.language,
builder: (context, language, _) {
return MaterialApp(
title: 'Morris GC',
debugShowCheckedModeBanner: false,
theme: buildGcTheme(),
home: ShellPage(controller: _controller),
);
},
);
}
}