Files
Navius/frontend/lib/app.dart
CNWei 1c98340fc5 feat: 实现导航页基础功能
- 添加导航条目和分类数据模型
- 实现导航卡片网格展示
- 支持点击卡片打开链接
- 添加主题样式(渐变色、卡片阴影)
- 区分系统默认和自定义条目
- 添加分类统计信息"
2026-09-19 21:53:15 +08:00

30 lines
957 B
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 'core/services/web_url_opener.dart';
import 'core/theme/app_theme.dart';
import 'features/home/data/http_home_repository.dart';
import 'features/home/presentation/pages/home_page.dart';
/// 应用根组件。
///
/// 只负责三件事:配置全局主题、装配依赖、指定首页。
/// 这里是「具体实现」接起来的地方,所以只有它需要知道首页数据来自后端:
/// [HttpHomeRepository] 默认打 `http://127.0.0.1:8080`,
/// 打包时用 `--dart-define=NAVIUS_API_BASE=…` 指向真实地址。
class NaviusApp extends StatelessWidget {
const NaviusApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Suxing Nav',
debugShowCheckedModeBanner: false,
theme: AppTheme.light,
home: HomePage(
repository: HttpHomeRepository(),
urlOpener: const WebUrlOpener(),
),
);
}
}