Skip to content

Commit

Permalink
Upgrade: Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe committed Aug 29, 2024
1 parent 8314eee commit 87abe14
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 127 deletions.
12 changes: 4 additions & 8 deletions lib/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import 'package:go_router/go_router.dart';
import 'package:bonfire/bonfire.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';

import 'widgets/pop_scope_route/pop_scope_route.dart';

import 'models/mood/mood_model.dart';

import 'init.dart';
Expand Down Expand Up @@ -117,12 +115,10 @@ class Routes {
StatefulNavigationShell navigationShell,
) {
/// 主屏幕
return PopScopeRoute(
child: Init(
child: MenuPage(
key: const Key('widget_menu_page'),
navigationShell: navigationShell,
),
return Init(
child: MenuPage(
key: const Key('widget_menu_page'),
navigationShell: navigationShell,
),
);
},
Expand Down
42 changes: 21 additions & 21 deletions lib/views/menu_screen/widgets/setting_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ Future<String> importDatabaseTemplate() async {
CellIndex.indexByString('E1'),
);
sheetObject.cell(CellIndex.indexByString('A1'))
..value = const TextCellValue('MoodExample')
..value = TextCellValue('MoodExample')
..cellStyle = CellStyle(
fontColorHex: ExcelColor.fromHexString('#FFFFFF'),
fontSize: 10,
Expand All @@ -367,30 +367,30 @@ Future<String> importDatabaseTemplate() async {

/// 创建字段标题
sheetObject.cell(CellIndex.indexByString('A2'))
..value = const TextCellValue('表情')
..value = TextCellValue('表情')
..cellStyle = cellStyle.copyWith(
fontFamilyVal: getFontFamily(FontFamily.Apple_Color_Emoji),
);
sheetObject.cell(CellIndex.indexByString('B2'))
..value = const TextCellValue('心情')
..value = TextCellValue('心情')
..cellStyle = cellStyle;
sheetObject.cell(CellIndex.indexByString('C2'))
..value = const TextCellValue('内容')
..value = TextCellValue('内容')
..cellStyle = cellStyle;
sheetObject.cell(CellIndex.indexByString('D2'))
..value = const TextCellValue('心情程度')
..value = TextCellValue('心情程度')
..cellStyle = cellStyle;
sheetObject.cell(CellIndex.indexByString('E2'))
..value = const TextCellValue('创建时间')
..value = TextCellValue('创建时间')
..cellStyle = cellStyle;

/// 添加Excel数据
sheetObject.appendRow([
const TextCellValue('😊'),
const TextCellValue('开心'),
const TextCellValue('今天很开心'),
const TextCellValue('55'),
const TextCellValue('2000-11-03'),
TextCellValue('😊'),
TextCellValue('开心'),
TextCellValue('今天很开心'),
TextCellValue('55'),
TextCellValue('2000-11-03'),
]);

/// 保存Excel
Expand Down Expand Up @@ -573,7 +573,7 @@ Future<String> importDatabaseError(List<List<Data?>> database) async {
CellIndex.indexByString('B1'),
);
sheetObject.cell(CellIndex.indexByString('A1'))
..value = const TextCellValue('MoodExample')
..value = TextCellValue('MoodExample')
..cellStyle = CellStyle(
fontColorHex: ExcelColor.fromHexString('#FFFFFF'),
fontSize: 10,
Expand All @@ -586,12 +586,12 @@ Future<String> importDatabaseError(List<List<Data?>> database) async {

/// 创建字段标题
sheetObject.cell(CellIndex.indexByString('A2'))
..value = const TextCellValue('错误所在行')
..value = TextCellValue('错误所在行')
..cellStyle = cellStyle.copyWith(
fontFamilyVal: getFontFamily(FontFamily.Apple_Color_Emoji),
);
sheetObject.cell(CellIndex.indexByString('B2'))
..value = const TextCellValue('错误内容')
..value = TextCellValue('错误内容')
..cellStyle = cellStyle;

/// 添加Excel数据
Expand Down Expand Up @@ -845,7 +845,7 @@ Future<String> exportDatabase() async {
CellIndex.indexByString('F1'),
);
sheetObject.cell(CellIndex.indexByString('A1'))
..value = const TextCellValue('MoodExample')
..value = TextCellValue('MoodExample')
..cellStyle = CellStyle(
fontColorHex: ExcelColor.fromHexString('#FFFFFF'),
fontSize: 10,
Expand All @@ -858,24 +858,24 @@ Future<String> exportDatabase() async {

/// 创建字段标题
sheetObject.cell(CellIndex.indexByString('A2'))
..value = const TextCellValue('表情')
..value = TextCellValue('表情')
..cellStyle = cellStyle.copyWith(
fontFamilyVal: getFontFamily(FontFamily.Apple_Color_Emoji),
);
sheetObject.cell(CellIndex.indexByString('B2'))
..value = const TextCellValue('心情')
..value = TextCellValue('心情')
..cellStyle = cellStyle;
sheetObject.cell(CellIndex.indexByString('C2'))
..value = const TextCellValue('内容')
..value = TextCellValue('内容')
..cellStyle = cellStyle;
sheetObject.cell(CellIndex.indexByString('D2'))
..value = const TextCellValue('心情程度')
..value = TextCellValue('心情程度')
..cellStyle = cellStyle;
sheetObject.cell(CellIndex.indexByString('E2'))
..value = const TextCellValue('创建时间')
..value = TextCellValue('创建时间')
..cellStyle = cellStyle;
sheetObject.cell(CellIndex.indexByString('F2'))
..value = const TextCellValue('修改时间')
..value = TextCellValue('修改时间')
..cellStyle = cellStyle;

/// 获取所有心情数据并赋值
Expand Down
3 changes: 1 addition & 2 deletions lib/views/settings/laboratory/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ class LaboratoryBody extends StatelessWidget {
color: Colors.black87,
),
title: '3D 城市',
subtitle:
'obj 格式,CPU 渲染性能较低,3D 来源 https://github.com/pissang/little-big-city',
subtitle: '3D 来源 https://github.com/pissang/little-big-city',
onPressed: () {
GoRouter.of(context).pushNamed(Routes.laboratoryPage3D);
},
Expand Down
43 changes: 0 additions & 43 deletions lib/widgets/pop_scope_route/pop_scope_route.dart

This file was deleted.

Loading

0 comments on commit 87abe14

Please sign in to comment.