37 lines
977 B
Dart
37 lines
977 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'app_shell.dart';
|
|
|
|
/// Dart 层的应用名。各平台原生的应用名(窗口标题、桌面图标)由各自的配置
|
|
/// 文件提供:android 的 `app_name` 字符串资源、ios 的 `CFBundleDisplayName`、
|
|
/// linux/windows 的 `APPLICATION_TITLE`,文本与这里保持一致。
|
|
const String appName = 'KiriMemo';
|
|
|
|
void main() {
|
|
runApp(const KiriMemoApp());
|
|
}
|
|
|
|
class KiriMemoApp extends StatelessWidget {
|
|
const KiriMemoApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: appName,
|
|
debugShowCheckedModeBanner: false,
|
|
theme: _theme(Brightness.light),
|
|
darkTheme: _theme(Brightness.dark),
|
|
home: const AppShell(),
|
|
);
|
|
}
|
|
|
|
static ThemeData _theme(Brightness brightness) {
|
|
return ThemeData(
|
|
colorScheme: ColorScheme.fromSeed(
|
|
seedColor: const Color(0xFF4C6EF5),
|
|
brightness: brightness,
|
|
),
|
|
);
|
|
}
|
|
}
|