mirror of
https://github.com/ZhuJHua/moodiary.git
synced 2026-04-05 16:31:45 +08:00
chore(deps): remove unnecessary dependencies
This commit is contained in:
61
lib/components/base/loading.dart
Normal file
61
lib/components/base/loading.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MoodiaryLoading extends StatelessWidget {
|
||||
const MoodiaryLoading({super.key, this.size = 24, this.color});
|
||||
|
||||
final double size;
|
||||
final Color? color;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(child: CircularProgressIndicator(color: color));
|
||||
}
|
||||
}
|
||||
|
||||
class MoodiarySyncing extends StatefulWidget {
|
||||
const MoodiarySyncing({super.key});
|
||||
|
||||
@override
|
||||
State<MoodiarySyncing> createState() => _MoodiarySyncingState();
|
||||
}
|
||||
|
||||
class _MoodiarySyncingState extends State<MoodiarySyncing>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late AnimationController _controller;
|
||||
late Animation<double> _animation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_controller = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(seconds: 2),
|
||||
)..repeat();
|
||||
|
||||
_animation = CurvedAnimation(
|
||||
parent: _controller,
|
||||
curve: Curves.elasticInOut,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: AnimatedBuilder(
|
||||
animation: _animation,
|
||||
builder: (context, child) {
|
||||
return Transform.rotate(angle: _animation.value * 2 * pi, child: child);
|
||||
},
|
||||
child: const Icon(Icons.sync_rounded),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moodiary/components/loading/loading.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:moodiary/main.dart';
|
||||
import 'package:refreshed/refreshed.dart';
|
||||
|
||||
@@ -27,65 +27,67 @@ class CategoryChoiceSheetComponent extends StatelessWidget {
|
||||
child: Obx(() {
|
||||
return AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child: !state.isFetching.value
|
||||
? Wrap(
|
||||
spacing: 4.0,
|
||||
runSpacing: 4.0,
|
||||
alignment: WrapAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
l10n.categoryAllCategory,
|
||||
style: textStyle.titleMedium,
|
||||
),
|
||||
Text(
|
||||
state.categoryList.length.toString(),
|
||||
style: textStyle.titleMedium,
|
||||
)
|
||||
],
|
||||
),
|
||||
ActionChip(
|
||||
label: Text(l10n.categoryAll),
|
||||
onPressed: () {
|
||||
logic.selectCategory(categoryId: null);
|
||||
},
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
padding: EdgeInsets.zero,
|
||||
backgroundColor: colorScheme.tertiaryContainer,
|
||||
),
|
||||
...List.generate(state.categoryList.value.length,
|
||||
(index) {
|
||||
return ActionChip(
|
||||
label: Text(
|
||||
state.categoryList.value[index].categoryName),
|
||||
child:
|
||||
!state.isFetching.value
|
||||
? Wrap(
|
||||
spacing: 4.0,
|
||||
runSpacing: 4.0,
|
||||
alignment: WrapAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
l10n.categoryAllCategory,
|
||||
style: textStyle.titleMedium,
|
||||
),
|
||||
Text(
|
||||
state.categoryList.length.toString(),
|
||||
style: textStyle.titleMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
ActionChip(
|
||||
label: Text(l10n.categoryAll),
|
||||
onPressed: () {
|
||||
logic.selectCategory(
|
||||
categoryId:
|
||||
state.categoryList.value[index].id);
|
||||
logic.selectCategory(categoryId: null);
|
||||
},
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
padding: EdgeInsets.zero,
|
||||
backgroundColor: colorScheme.secondaryContainer,
|
||||
);
|
||||
}),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
logic.toCategoryManage(context);
|
||||
},
|
||||
child: Text(l10n.settingFunctionCategoryManage),
|
||||
backgroundColor: colorScheme.tertiaryContainer,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: const Center(
|
||||
child: Processing(),
|
||||
),
|
||||
...List.generate(state.categoryList.value.length, (
|
||||
index,
|
||||
) {
|
||||
return ActionChip(
|
||||
label: Text(
|
||||
state.categoryList.value[index].categoryName,
|
||||
),
|
||||
onPressed: () {
|
||||
logic.selectCategory(
|
||||
categoryId:
|
||||
state.categoryList.value[index].id,
|
||||
);
|
||||
},
|
||||
materialTapTargetSize:
|
||||
MaterialTapTargetSize.shrinkWrap,
|
||||
padding: EdgeInsets.zero,
|
||||
backgroundColor: colorScheme.secondaryContainer,
|
||||
);
|
||||
}),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
logic.toCategoryManage(context);
|
||||
},
|
||||
child: Text(l10n.settingFunctionCategoryManage),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: const MoodiaryLoading(),
|
||||
);
|
||||
}),
|
||||
),
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moodiary/common/values/view_mode.dart';
|
||||
import 'package:moodiary/components/base/clipper.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:moodiary/components/diary_card/grid_diary_card_view.dart';
|
||||
import 'package:moodiary/components/diary_card/list_diary_card_view.dart';
|
||||
import 'package:moodiary/components/loading/loading.dart';
|
||||
import 'package:moodiary/main.dart';
|
||||
import 'package:refreshed/refreshed.dart';
|
||||
import 'package:sliver_tools/sliver_tools.dart';
|
||||
@@ -19,13 +19,7 @@ class DiaryTabViewComponent extends StatelessWidget {
|
||||
Widget _buildPlaceholder(double height) {
|
||||
return SliverToBoxAdapter(
|
||||
key: const ValueKey('placeholder'),
|
||||
child: SizedBox(
|
||||
height: height,
|
||||
child: const Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: EditingLoading(),
|
||||
),
|
||||
),
|
||||
child: SizedBox(height: height, child: const MoodiaryLoading()),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,10 +28,7 @@ class DiaryTabViewComponent extends StatelessWidget {
|
||||
key: const ValueKey('empty'),
|
||||
child: SizedBox(
|
||||
height: height,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Text(l10n.diaryTabViewEmpty),
|
||||
),
|
||||
child: Center(child: Text(l10n.diaryTabViewEmpty)),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -52,7 +43,12 @@ class DiaryTabViewComponent extends StatelessWidget {
|
||||
);
|
||||
final state = Bind.find<DiaryTabViewLogic>(tag: logicTag).state;
|
||||
final size = MediaQuery.sizeOf(context);
|
||||
final placeholderHeight = size.height / 2 - kToolbarHeight - 46;
|
||||
final placeholderHeight =
|
||||
size.height -
|
||||
barHeight -
|
||||
MediaQuery.paddingOf(context).bottom -
|
||||
56 -
|
||||
46;
|
||||
|
||||
Widget buildGrid() {
|
||||
return Obx(() {
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rive_animated_icon/rive_animated_icon.dart';
|
||||
|
||||
class Processing extends StatelessWidget {
|
||||
final Color? color;
|
||||
|
||||
const Processing({super.key, this.color});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return LoopingRiveIcon(
|
||||
riveIcon: RiveIcon.reload,
|
||||
width: 80,
|
||||
height: 80,
|
||||
color: color ?? colorScheme.onSurface,
|
||||
strokeWidth: 4.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class SearchLoading extends StatelessWidget {
|
||||
const SearchLoading({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return LoopingRiveIcon(
|
||||
riveIcon: RiveIcon.search,
|
||||
width: 80,
|
||||
height: 80,
|
||||
color: colorScheme.onSurface,
|
||||
strokeWidth: 4.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class EditingLoading extends StatelessWidget {
|
||||
const EditingLoading({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return LoopingRiveIcon(
|
||||
riveIcon: RiveIcon.edit,
|
||||
width: 80,
|
||||
height: 80,
|
||||
color: colorScheme.onSurface,
|
||||
strokeWidth: 4.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class NetworkLoading1 extends StatelessWidget {
|
||||
const NetworkLoading1({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return LoopingRiveIcon(
|
||||
riveIcon: RiveIcon.wifi,
|
||||
width: 80,
|
||||
height: 80,
|
||||
color: colorScheme.onSurface,
|
||||
strokeWidth: 4.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class NetworkLoading2 extends StatelessWidget {
|
||||
const NetworkLoading2({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return LoopingRiveIcon(
|
||||
riveIcon: RiveIcon.globe,
|
||||
width: 80,
|
||||
height: 80,
|
||||
color: colorScheme.onSurface,
|
||||
strokeWidth: 4.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MediaLoading extends StatelessWidget {
|
||||
final Color? color;
|
||||
|
||||
final double? size;
|
||||
|
||||
const MediaLoading({super.key, this.color, this.size});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return LoopingRiveIcon(
|
||||
riveIcon: RiveIcon.gallery,
|
||||
width: size ?? 80,
|
||||
height: size ?? 80,
|
||||
color: color ?? colorScheme.onSurface,
|
||||
strokeWidth: 4.0,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moodiary/components/loading/loading.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:moodiary/components/local_send/local_send_view.dart';
|
||||
import 'package:moodiary/components/sync_dash_board/sync_dash_board_state.dart';
|
||||
import 'package:moodiary/components/sync_dash_board/web_dav_dashboard/web_dav_dashboard_view.dart';
|
||||
@@ -21,9 +21,10 @@ class SyncDashBoardComponent extends StatelessWidget {
|
||||
assignId: true,
|
||||
builder: (_) {
|
||||
return AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
child: !state.isFetching
|
||||
? Column(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
child:
|
||||
!state.isFetching
|
||||
? Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Expanded(
|
||||
@@ -41,10 +42,11 @@ class SyncDashBoardComponent extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
logic.changePage(0);
|
||||
},
|
||||
icon: const Icon(Icons.chevron_left_rounded)),
|
||||
onPressed: () {
|
||||
logic.changePage(0);
|
||||
},
|
||||
icon: const Icon(Icons.chevron_left_rounded),
|
||||
),
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: SmoothPageIndicator(
|
||||
@@ -52,24 +54,27 @@ class SyncDashBoardComponent extends StatelessWidget {
|
||||
count: 2,
|
||||
axisDirection: Axis.horizontal,
|
||||
effect: ExpandingDotsEffect(
|
||||
dotWidth: 8.0,
|
||||
dotHeight: 8.0,
|
||||
activeDotColor: colorScheme.primary,
|
||||
dotColor: colorScheme.secondary),
|
||||
dotWidth: 8.0,
|
||||
dotHeight: 8.0,
|
||||
activeDotColor: colorScheme.primary,
|
||||
dotColor: colorScheme.secondary,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
logic.changePage(1);
|
||||
},
|
||||
icon: const Icon(Icons.chevron_right_rounded)),
|
||||
onPressed: () {
|
||||
logic.changePage(1);
|
||||
},
|
||||
icon: const Icon(Icons.chevron_right_rounded),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: const Center(child: NetworkLoading1()));
|
||||
: const MoodiaryLoading(),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:moodiary/common/values/webdav.dart';
|
||||
import 'package:moodiary/components/loading/loading.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:moodiary/components/tile/setting_tile.dart';
|
||||
import 'package:moodiary/main.dart';
|
||||
import 'package:moodiary/utils/webdav_util.dart';
|
||||
@@ -198,7 +198,7 @@ class WebDavDashboardComponent extends StatelessWidget {
|
||||
],
|
||||
],
|
||||
),
|
||||
if (state.isFetching) const Center(child: Processing()),
|
||||
if (state.isFetching) const MoodiaryLoading(),
|
||||
if (state.connectivityStatus.value ==
|
||||
WebDavConnectivityStatus.unconnected)
|
||||
_buildError(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:chewie/chewie.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moodiary/components/loading/loading.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:refreshed/refreshed.dart';
|
||||
|
||||
import 'video_player_logic.dart';
|
||||
@@ -13,11 +13,12 @@ class VideoPlayerComponent extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final VideoPlayerLogic logic =
|
||||
Get.put(VideoPlayerLogic(videoPath: videoPath), tag: videoPath);
|
||||
final VideoPlayerLogic logic = Get.put(
|
||||
VideoPlayerLogic(videoPath: videoPath),
|
||||
tag: videoPath,
|
||||
);
|
||||
final VideoPlayerState state =
|
||||
Bind.find<VideoPlayerLogic>(tag: videoPath).state;
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
// Widget buildCustomTheme({required Widget child}) {
|
||||
// if (Platform.isAndroid || Platform.isIOS) {
|
||||
@@ -54,11 +55,7 @@ class VideoPlayerComponent extends StatelessWidget {
|
||||
child: Obx(() {
|
||||
return state.isInitialized.value
|
||||
? Chewie(controller: logic.chewieController)
|
||||
: Center(
|
||||
child: MediaLoading(
|
||||
color: colorScheme.primary,
|
||||
size: 56,
|
||||
));
|
||||
: const MoodiaryLoading();
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -39,12 +39,7 @@ Future<void> _initSystem() async {
|
||||
await IsarUtil.initIsar();
|
||||
await ThemeUtil().buildTheme();
|
||||
await WebDavUtil().initWebDav();
|
||||
VideoPlayerMediaKit.ensureInitialized(
|
||||
android: true,
|
||||
iOS: true,
|
||||
macOS: true,
|
||||
windows: true,
|
||||
);
|
||||
VideoPlayerMediaKit.ensureInitialized(windows: true);
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
const SystemUiOverlayStyle(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moodiary/components/base/button.dart';
|
||||
import 'package:moodiary/components/loading/loading.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:moodiary/components/tile/setting_tile.dart';
|
||||
import 'package:moodiary/main.dart';
|
||||
import 'package:refreshed/refreshed.dart';
|
||||
@@ -71,9 +71,7 @@ class CategoryManagerPage extends StatelessWidget {
|
||||
},
|
||||
itemCount: state.categoryList.length,
|
||||
)
|
||||
: const Center(
|
||||
child: Processing(),
|
||||
),
|
||||
: const MoodiaryLoading(),
|
||||
);
|
||||
}),
|
||||
floatingActionButton: Obx(() {
|
||||
|
||||
@@ -3,12 +3,11 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:moodiary/common/values/border.dart';
|
||||
import 'package:moodiary/components/base/button.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:moodiary/components/base/text.dart';
|
||||
import 'package:moodiary/components/loading/loading.dart';
|
||||
import 'package:moodiary/components/tile/setting_tile.dart';
|
||||
import 'package:moodiary/main.dart';
|
||||
import 'package:refreshed/refreshed.dart';
|
||||
import 'package:rive_animated_icon/rive_animated_icon.dart';
|
||||
|
||||
import 'font_logic.dart';
|
||||
|
||||
@@ -36,24 +35,18 @@ class FontPage extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: AppBorderRadius.mediumBorderRadius,
|
||||
border: Border.all(
|
||||
color: isSelected ? activeColor : inactiveColor,
|
||||
width: isSelected ? 2 : 1),
|
||||
color: isSelected ? activeColor : inactiveColor,
|
||||
width: isSelected ? 2 : 1,
|
||||
),
|
||||
),
|
||||
width: 64,
|
||||
height: 64,
|
||||
child: const Center(
|
||||
child: Text('Aa',
|
||||
style: TextStyle(
|
||||
fontSize: 32,
|
||||
fontFamily: '',
|
||||
)),
|
||||
child: Text('Aa', style: TextStyle(fontSize: 32, fontFamily: '')),
|
||||
),
|
||||
),
|
||||
),
|
||||
AdaptiveText(
|
||||
l10n.fontStyleSystem,
|
||||
style: textStyle,
|
||||
),
|
||||
AdaptiveText(l10n.fontStyleSystem, style: textStyle),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -83,27 +76,21 @@ class FontPage extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: AppBorderRadius.mediumBorderRadius,
|
||||
border: Border.all(
|
||||
color: isSelected ? activeColor : inactiveColor,
|
||||
width: isSelected ? 2 : 1),
|
||||
color: isSelected ? activeColor : inactiveColor,
|
||||
width: isSelected ? 2 : 1,
|
||||
),
|
||||
),
|
||||
width: 64,
|
||||
height: 64,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Aa',
|
||||
style: TextStyle(
|
||||
fontSize: 32,
|
||||
fontFamily: fontName,
|
||||
),
|
||||
style: TextStyle(fontSize: 32, fontFamily: fontName),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
AdaptiveText(
|
||||
fontName,
|
||||
style: textStyle,
|
||||
maxWidth: 64,
|
||||
),
|
||||
AdaptiveText(fontName, style: textStyle, maxWidth: 64),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -123,18 +110,12 @@ class FontPage extends StatelessWidget {
|
||||
},
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: AppBorderRadius.mediumBorderRadius, color: color),
|
||||
borderRadius: AppBorderRadius.mediumBorderRadius,
|
||||
color: color,
|
||||
),
|
||||
width: 64,
|
||||
height: 64,
|
||||
child: Center(
|
||||
child: LoopingRiveIcon(
|
||||
riveIcon: RiveIcon.add,
|
||||
width: 32,
|
||||
height: 32,
|
||||
strokeWidth: 4,
|
||||
color: iconColor,
|
||||
),
|
||||
),
|
||||
child: const Center(child: Icon(Icons.add_circle_rounded)),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
@@ -203,28 +184,30 @@ class FontPage extends StatelessWidget {
|
||||
),
|
||||
...List.generate(state.fontList.length, (index) {
|
||||
return _buildFont(
|
||||
isSelected: state.currentFontFamily.value ==
|
||||
state.fontList[index].fontFamily,
|
||||
fontName: state.fontList[index].fontFamily,
|
||||
activeColor: colorScheme.primary,
|
||||
inactiveColor: colorScheme.surfaceContainerHighest,
|
||||
textStyle: textStyle.labelSmall,
|
||||
context: context,
|
||||
onTap: () {
|
||||
logic.changeSelectedFont(font: state.fontList[index]);
|
||||
},
|
||||
onLongPress: () async {
|
||||
// 显示删除字体对话框
|
||||
final res = showOkCancelAlertDialog(
|
||||
context: context,
|
||||
title: l10n.hint,
|
||||
style: AdaptiveStyle.material,
|
||||
message: l10n.fontDeleteDes(state.fontList[index].fontFamily),
|
||||
);
|
||||
if (await res == OkCancelResult.ok) {
|
||||
logic.deleteFont(font: state.fontList[index]);
|
||||
}
|
||||
});
|
||||
isSelected:
|
||||
state.currentFontFamily.value ==
|
||||
state.fontList[index].fontFamily,
|
||||
fontName: state.fontList[index].fontFamily,
|
||||
activeColor: colorScheme.primary,
|
||||
inactiveColor: colorScheme.surfaceContainerHighest,
|
||||
textStyle: textStyle.labelSmall,
|
||||
context: context,
|
||||
onTap: () {
|
||||
logic.changeSelectedFont(font: state.fontList[index]);
|
||||
},
|
||||
onLongPress: () async {
|
||||
// 显示删除字体对话框
|
||||
final res = showOkCancelAlertDialog(
|
||||
context: context,
|
||||
title: l10n.hint,
|
||||
style: AdaptiveStyle.material,
|
||||
message: l10n.fontDeleteDes(state.fontList[index].fontFamily),
|
||||
);
|
||||
if (await res == OkCancelResult.ok) {
|
||||
logic.deleteFont(font: state.fontList[index]);
|
||||
}
|
||||
},
|
||||
);
|
||||
}),
|
||||
_buildManage(
|
||||
onTap: logic.addFont,
|
||||
@@ -239,21 +222,19 @@ class FontPage extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: size.width < 600
|
||||
? SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Obx(() {
|
||||
return Row(
|
||||
spacing: 16,
|
||||
children: buildFontButton(),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: Wrap(
|
||||
spacing: 16,
|
||||
runSpacing: 16,
|
||||
children: buildFontButton(),
|
||||
),
|
||||
child:
|
||||
size.width < 600
|
||||
? SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Obx(() {
|
||||
return Row(spacing: 16, children: buildFontButton());
|
||||
}),
|
||||
)
|
||||
: Wrap(
|
||||
spacing: 16,
|
||||
runSpacing: 16,
|
||||
children: buildFontButton(),
|
||||
),
|
||||
),
|
||||
const Divider(endIndent: 24, indent: 24),
|
||||
AdaptiveListTile(
|
||||
@@ -270,7 +251,7 @@ class FontPage extends StatelessWidget {
|
||||
1.1 => l10n.fontSizeLarge,
|
||||
1.2 => l10n.fontSizeSuperLarge,
|
||||
_ => l10n.fontSizeStandard,
|
||||
})
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -298,47 +279,49 @@ class FontPage extends StatelessWidget {
|
||||
backgroundColor: colorScheme.surfaceContainerLow,
|
||||
),
|
||||
backgroundColor: colorScheme.surfaceContainerLow,
|
||||
body: size.width < 600
|
||||
? Obx(() {
|
||||
return !state.isFetching.value
|
||||
? Padding(
|
||||
body:
|
||||
size.width < 600
|
||||
? Obx(() {
|
||||
return !state.isFetching.value
|
||||
? Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: state.bottomSheetHeight.value),
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: state.bottomSheetHeight.value,
|
||||
),
|
||||
child: buildText(),
|
||||
)
|
||||
: const Center(
|
||||
child: Processing(),
|
||||
);
|
||||
})
|
||||
: Obx(() {
|
||||
return !state.isFetching.value
|
||||
? RepaintBoundary(
|
||||
: const MoodiaryLoading();
|
||||
})
|
||||
: Obx(() {
|
||||
return !state.isFetching.value
|
||||
? RepaintBoundary(
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 16, right: 16),
|
||||
child: buildText(),
|
||||
)),
|
||||
Expanded(child: buildOption())
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 16,
|
||||
right: 16,
|
||||
),
|
||||
child: buildText(),
|
||||
),
|
||||
),
|
||||
Expanded(child: buildOption()),
|
||||
],
|
||||
),
|
||||
)
|
||||
: const Center(
|
||||
child: Processing(),
|
||||
);
|
||||
}),
|
||||
: const MoodiaryLoading();
|
||||
}),
|
||||
resizeToAvoidBottomInset: false,
|
||||
floatingActionButton: size.width > 600
|
||||
? FloatingActionButton.extended(
|
||||
onPressed: logic.saveFontScale,
|
||||
label: Text(l10n.apply),
|
||||
icon: const Icon(Icons.check_rounded),
|
||||
)
|
||||
: null,
|
||||
floatingActionButton:
|
||||
size.width > 600
|
||||
? FloatingActionButton.extended(
|
||||
onPressed: logic.saveFontScale,
|
||||
label: Text(l10n.apply),
|
||||
icon: const Icon(Icons.check_rounded),
|
||||
)
|
||||
: null,
|
||||
bottomSheet: Obx(() {
|
||||
return Visibility(
|
||||
visible: !state.isFetching.value && size.width < 600,
|
||||
@@ -376,9 +359,7 @@ class FontPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: buildOption(),
|
||||
),
|
||||
Expanded(child: buildOption()),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: FilledButton(
|
||||
|
||||
@@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:moodiary/common/values/border.dart';
|
||||
import 'package:moodiary/common/values/colors.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:moodiary/components/diary_card/calendar_diary_card_view.dart';
|
||||
import 'package:moodiary/components/loading/loading.dart';
|
||||
import 'package:moodiary/components/time_line/time_line_view.dart';
|
||||
import 'package:moodiary/utils/array_util.dart';
|
||||
import 'package:refreshed/refreshed.dart';
|
||||
@@ -219,10 +219,7 @@ class CalendarPage extends StatelessWidget {
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child:
|
||||
state.isFetching.value
|
||||
? const Center(
|
||||
key: ValueKey('processing'),
|
||||
child: Processing(),
|
||||
)
|
||||
? const MoodiaryLoading()
|
||||
: (state.currentMonthDiaryList.isNotEmpty
|
||||
? buildCardList()
|
||||
: Center(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:moodiary/common/values/view_mode.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:moodiary/components/base/sheet.dart';
|
||||
import 'package:moodiary/components/base/text.dart';
|
||||
import 'package:moodiary/components/category_choice_sheet/category_choice_sheet_view.dart';
|
||||
@@ -12,7 +13,6 @@ import 'package:moodiary/components/sync_dash_board/sync_dash_board_view.dart';
|
||||
import 'package:moodiary/main.dart';
|
||||
import 'package:moodiary/utils/webdav_util.dart';
|
||||
import 'package:refreshed/refreshed.dart';
|
||||
import 'package:rive_animated_icon/rive_animated_icon.dart';
|
||||
|
||||
import 'diary_logic.dart';
|
||||
|
||||
@@ -31,14 +31,7 @@ class DiaryPage extends StatelessWidget {
|
||||
color: colorScheme.primaryContainer,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: RiveAnimatedIcon(
|
||||
riveIcon: RiveIcon.reload,
|
||||
color: colorScheme.onPrimaryContainer,
|
||||
width: 24,
|
||||
height: 24,
|
||||
loopAnimation: true,
|
||||
onTap: onTap,
|
||||
),
|
||||
child: const MoodiarySyncing(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:moodiary/common/values/border.dart';
|
||||
import 'package:moodiary/common/values/media_type.dart';
|
||||
import 'package:moodiary/components/base/clipper.dart';
|
||||
import 'package:moodiary/components/loading/loading.dart';
|
||||
import 'package:moodiary/components/base/loading.dart';
|
||||
import 'package:moodiary/components/lottie_modal/lottie_modal.dart';
|
||||
import 'package:moodiary/components/media/media_audio_view.dart';
|
||||
import 'package:moodiary/components/media/media_image_view.dart';
|
||||
@@ -120,10 +120,7 @@ class MediaPage extends StatelessWidget {
|
||||
duration: const Duration(milliseconds: 400),
|
||||
child:
|
||||
state.isFetching
|
||||
? const Center(
|
||||
key: ValueKey('searching'),
|
||||
child: SearchLoading(),
|
||||
)
|
||||
? const MoodiaryLoading()
|
||||
: (state.datetimeMediaMap.isNotEmpty
|
||||
? PageClipper(
|
||||
child: ScrollablePositionedList.builder(
|
||||
|
||||
@@ -23,11 +23,7 @@ import 'package:uuid/uuid.dart';
|
||||
class IsarUtil {
|
||||
static late final Isar _isar;
|
||||
|
||||
static final _schemas = [
|
||||
DiarySchema,
|
||||
CategorySchema,
|
||||
FontSchema,
|
||||
];
|
||||
static final _schemas = [DiarySchema, CategorySchema, FontSchema];
|
||||
|
||||
static Future<void> initIsar() async {
|
||||
_isar = await Isar.openAsync(
|
||||
@@ -70,11 +66,11 @@ class IsarUtil {
|
||||
|
||||
//导出数据
|
||||
static Future<void> exportIsar(
|
||||
String dir, String path, String fileName) async {
|
||||
final isar = Isar.open(
|
||||
schemas: _schemas,
|
||||
directory: join(dir, 'database'),
|
||||
);
|
||||
String dir,
|
||||
String path,
|
||||
String fileName,
|
||||
) async {
|
||||
final isar = Isar.open(schemas: _schemas, directory: join(dir, 'database'));
|
||||
isar.copyToFile(join(path, fileName));
|
||||
isar.close();
|
||||
}
|
||||
@@ -102,8 +98,11 @@ class IsarUtil {
|
||||
}
|
||||
|
||||
//根据日期范围获取日记
|
||||
static Future<List<Diary>> getDiariesByDateRange(DateTime start, DateTime end,
|
||||
{bool all = true}) async {
|
||||
static Future<List<Diary>> getDiariesByDateRange(
|
||||
DateTime start,
|
||||
DateTime end, {
|
||||
bool all = true,
|
||||
}) async {
|
||||
return await _isar.diarys
|
||||
.where()
|
||||
.timeBetween(start, end)
|
||||
@@ -127,7 +126,9 @@ class IsarUtil {
|
||||
|
||||
//获取指定范围内的天气
|
||||
static Future<List<List<String>>> getWeatherByDateRange(
|
||||
DateTime start, DateTime end) async {
|
||||
DateTime start,
|
||||
DateTime end,
|
||||
) async {
|
||||
return (await _isar.diarys
|
||||
.where()
|
||||
.showEqualTo(true)
|
||||
@@ -140,7 +141,9 @@ class IsarUtil {
|
||||
|
||||
//获取指定范围的心情指数
|
||||
static Future<List<double>> getMoodByDateRange(
|
||||
DateTime start, DateTime end) async {
|
||||
DateTime start,
|
||||
DateTime end,
|
||||
) async {
|
||||
return (await _isar.diarys
|
||||
.where()
|
||||
.showEqualTo(true)
|
||||
@@ -168,8 +171,10 @@ class IsarUtil {
|
||||
}
|
||||
|
||||
//更新日记
|
||||
static Future<void> updateADiary(
|
||||
{Diary? oldDiary, required Diary newDiary}) async {
|
||||
static Future<void> updateADiary({
|
||||
Diary? oldDiary,
|
||||
required Diary newDiary,
|
||||
}) async {
|
||||
// 如果没有旧日记,说明是新增日记
|
||||
newDiary.lastModified = DateTime.now();
|
||||
await _isar.writeAsync((isar) {
|
||||
@@ -181,8 +186,12 @@ class IsarUtil {
|
||||
await FileUtil.cleanUpOldMediaFiles(oldDiary, newDiary);
|
||||
if (WebDavUtil().hasOption &&
|
||||
PrefUtil.getValue<bool>('autoSyncAfterChange') == true) {
|
||||
unawaited(WebDavUtil()
|
||||
.updateSingleDiary(oldDiary: oldDiary, newDiary: newDiary));
|
||||
unawaited(
|
||||
WebDavUtil().updateSingleDiary(
|
||||
oldDiary: oldDiary,
|
||||
newDiary: newDiary,
|
||||
),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (WebDavUtil().hasOption &&
|
||||
@@ -194,16 +203,18 @@ class IsarUtil {
|
||||
|
||||
//查询日记
|
||||
static Future<List<Diary>> searchDiaries(String value) async {
|
||||
final contentResults = await _isar.diarys
|
||||
.where()
|
||||
.showEqualTo(true)
|
||||
.contentTextContains(value)
|
||||
.findAllAsync();
|
||||
final titleResults = await _isar.diarys
|
||||
.where()
|
||||
.showEqualTo(true)
|
||||
.titleContains(value)
|
||||
.findAllAsync();
|
||||
final contentResults =
|
||||
await _isar.diarys
|
||||
.where()
|
||||
.showEqualTo(true)
|
||||
.contentTextContains(value)
|
||||
.findAllAsync();
|
||||
final titleResults =
|
||||
await _isar.diarys
|
||||
.where()
|
||||
.showEqualTo(true)
|
||||
.titleContains(value)
|
||||
.findAllAsync();
|
||||
|
||||
// 合并并去重
|
||||
final combinedResults = {...contentResults, ...titleResults}.toList();
|
||||
@@ -245,10 +256,11 @@ class IsarUtil {
|
||||
static Future<bool> insertACategory(Category category) async {
|
||||
return await _isar.writeAsync((isar) {
|
||||
// 查询数据库中是否有同名但 ID 不同的分类
|
||||
final existingCategory = isar.categorys
|
||||
.where()
|
||||
.categoryNameEqualTo(category.categoryName)
|
||||
.findFirst();
|
||||
final existingCategory =
|
||||
isar.categorys
|
||||
.where()
|
||||
.categoryNameEqualTo(category.categoryName)
|
||||
.findFirst();
|
||||
if (existingCategory != null && existingCategory.id != category.id) {
|
||||
// 如果同名但 ID 不同,则修改分类名称并添加随机后缀
|
||||
category.categoryName =
|
||||
@@ -267,10 +279,11 @@ class IsarUtil {
|
||||
static Future<bool> updateACategory(Category category) async {
|
||||
return await _isar.writeAsync((isar) {
|
||||
// 查询数据库中是否有同名但 ID 不同的分类
|
||||
final existingCategory = isar.categorys
|
||||
.where()
|
||||
.categoryNameEqualTo(category.categoryName)
|
||||
.findFirst();
|
||||
final existingCategory =
|
||||
isar.categorys
|
||||
.where()
|
||||
.categoryNameEqualTo(category.categoryName)
|
||||
.findFirst();
|
||||
if (existingCategory != null && existingCategory.id != category.id) {
|
||||
// 如果同名但 ID 不同,则修改分类名称并添加随机后缀
|
||||
category.categoryName =
|
||||
@@ -314,7 +327,10 @@ class IsarUtil {
|
||||
|
||||
//获取对应分类的日记,如果为空,返回全部日记
|
||||
static Future<List<Diary>> getDiaryByCategory(
|
||||
String? categoryId, int offset, int limit) async {
|
||||
String? categoryId,
|
||||
int offset,
|
||||
int limit,
|
||||
) async {
|
||||
if (categoryId == null) {
|
||||
return await _isar.diarys
|
||||
.where()
|
||||
@@ -337,25 +353,24 @@ class IsarUtil {
|
||||
.where()
|
||||
.showEqualTo(true)
|
||||
.yMdEqualTo(
|
||||
'${time.year.toString()}/${time.month.toString()}/${time.day.toString()}')
|
||||
'${time.year.toString()}/${time.month.toString()}/${time.day.toString()}',
|
||||
)
|
||||
.sortByTimeDesc()
|
||||
.findAllAsync();
|
||||
}
|
||||
|
||||
static Future<List<Diary>> getDiary(int offset, int limit) async {
|
||||
return await _isar.diarys
|
||||
.where()
|
||||
.findAllAsync(offset: offset, limit: limit);
|
||||
return await _isar.diarys.where().findAllAsync(
|
||||
offset: offset,
|
||||
limit: limit,
|
||||
);
|
||||
}
|
||||
|
||||
/// 2.4.8 版本变更
|
||||
/// 新增字段
|
||||
/// 1.position 用于记录位置
|
||||
static void mergeToV2_4_8(String dir) {
|
||||
final isar = Isar.open(
|
||||
schemas: _schemas,
|
||||
directory: dir,
|
||||
);
|
||||
final isar = Isar.open(schemas: _schemas, directory: dir);
|
||||
final countDiary = isar.diarys.where().count();
|
||||
for (var i = 0; i < countDiary; i += 50) {
|
||||
final diaries = isar.diarys.where().findAll(offset: i, limit: 50);
|
||||
@@ -374,10 +389,7 @@ class IsarUtil {
|
||||
/// 1.将时间字段修改为最后修改时间
|
||||
/// 2.将类型字段修改为富文本
|
||||
static void mergeToV2_6_0(String dir) {
|
||||
final isar = Isar.open(
|
||||
schemas: _schemas,
|
||||
directory: dir,
|
||||
);
|
||||
final isar = Isar.open(schemas: _schemas, directory: dir);
|
||||
final countDiary = isar.diarys.where().count();
|
||||
|
||||
for (var i = 0; i < countDiary; i += 50) {
|
||||
@@ -392,8 +404,9 @@ class IsarUtil {
|
||||
diary.type = DiaryType.richText.value;
|
||||
diary.lastModified = diary.time; // 设置最后修改时间
|
||||
// 遍历资源文件,将资源文件插入到富文本中
|
||||
quillController.document =
|
||||
Document.fromJson(jsonDecode(diary.content));
|
||||
quillController.document = Document.fromJson(
|
||||
jsonDecode(diary.content),
|
||||
);
|
||||
|
||||
for (final image in diary.imageName) {
|
||||
insertNewImage(imageName: image, quillController: quillController);
|
||||
@@ -406,8 +419,9 @@ class IsarUtil {
|
||||
}
|
||||
|
||||
// 更新富文本内容
|
||||
diary.content =
|
||||
jsonEncode(quillController.document.toDelta().toJson());
|
||||
diary.content = jsonEncode(
|
||||
quillController.document.toDelta().toJson(),
|
||||
);
|
||||
|
||||
// 保存更新后的日记
|
||||
isar.diarys.put(diary);
|
||||
@@ -425,10 +439,7 @@ class IsarUtil {
|
||||
/// 修复之前webdav同步时,没有同步分类的问题
|
||||
/// 遍历所有日记,如果本地没有日记的分类,就创建一个分类,名称为分类名
|
||||
static void fixV2_6_3(String dir) {
|
||||
final isar = Isar.open(
|
||||
schemas: _schemas,
|
||||
directory: dir,
|
||||
);
|
||||
final isar = Isar.open(schemas: _schemas, directory: dir);
|
||||
final countDiary = isar.diarys.where().count();
|
||||
for (var i = 0; i < countDiary; i += 50) {
|
||||
final diaries = isar.diarys.where().findAll(offset: i, limit: 50);
|
||||
@@ -449,31 +460,49 @@ class IsarUtil {
|
||||
isar.close();
|
||||
}
|
||||
|
||||
static void insertNewImage(
|
||||
{required String imageName, required QuillController quillController}) {
|
||||
static void insertNewImage({
|
||||
required String imageName,
|
||||
required QuillController quillController,
|
||||
}) {
|
||||
final imageBlock = ImageBlockEmbed.fromName(imageName);
|
||||
final index = quillController.selection.baseOffset;
|
||||
final length = quillController.selection.extentOffset - index;
|
||||
quillController.replaceText(
|
||||
index, length, imageBlock, TextSelection.collapsed(offset: index + 1));
|
||||
index,
|
||||
length,
|
||||
imageBlock,
|
||||
TextSelection.collapsed(offset: index + 1),
|
||||
);
|
||||
}
|
||||
|
||||
static void insertNewVideo(
|
||||
{required String videoName, required QuillController quillController}) {
|
||||
static void insertNewVideo({
|
||||
required String videoName,
|
||||
required QuillController quillController,
|
||||
}) {
|
||||
final videoBlock = VideoBlockEmbed.fromName(videoName);
|
||||
final index = quillController.selection.baseOffset;
|
||||
final length = quillController.selection.extentOffset - index;
|
||||
quillController.replaceText(
|
||||
index, length, videoBlock, TextSelection.collapsed(offset: index + 1));
|
||||
index,
|
||||
length,
|
||||
videoBlock,
|
||||
TextSelection.collapsed(offset: index + 1),
|
||||
);
|
||||
}
|
||||
|
||||
static void insertAudio(
|
||||
{required String audioName, required QuillController quillController}) {
|
||||
static void insertAudio({
|
||||
required String audioName,
|
||||
required QuillController quillController,
|
||||
}) {
|
||||
final audioBlock = AudioBlockEmbed.fromName(audioName);
|
||||
final index = quillController.selection.baseOffset;
|
||||
final length = quillController.selection.extentOffset - index;
|
||||
quillController.replaceText(
|
||||
index, length, audioBlock, TextSelection.collapsed(offset: index + 1));
|
||||
index,
|
||||
length,
|
||||
audioBlock,
|
||||
TextSelection.collapsed(offset: index + 1),
|
||||
);
|
||||
}
|
||||
|
||||
// 获取用于地图显示的对象
|
||||
@@ -484,17 +513,23 @@ class IsarUtil {
|
||||
/// 要满足以下条件
|
||||
/// 1. 有定位坐标
|
||||
/// 2. show
|
||||
final diaries = await _isar.diarys
|
||||
.where()
|
||||
.showEqualTo(true)
|
||||
.positionIsNotEmpty()
|
||||
.findAllAsync();
|
||||
final diaries =
|
||||
await _isar.diarys
|
||||
.where()
|
||||
.showEqualTo(true)
|
||||
.positionIsNotEmpty()
|
||||
.findAllAsync();
|
||||
for (final diary in diaries) {
|
||||
res.add(DiaryMapItem(
|
||||
res.add(
|
||||
DiaryMapItem(
|
||||
LatLng(
|
||||
double.parse(diary.position[0]), double.parse(diary.position[1])),
|
||||
double.parse(diary.position[0]),
|
||||
double.parse(diary.position[1]),
|
||||
),
|
||||
diary.isarId,
|
||||
diary.imageName.isEmpty ? '' : diary.imageName.first));
|
||||
diary.imageName.isEmpty ? '' : diary.imageName.first,
|
||||
),
|
||||
);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -523,10 +558,7 @@ class IsarUtil {
|
||||
}
|
||||
|
||||
static Future<void> mergeToV2_7_3(Map<String, dynamic> parma) async {
|
||||
final isar = Isar.open(
|
||||
schemas: _schemas,
|
||||
directory: parma['database']!,
|
||||
);
|
||||
final isar = Isar.open(schemas: _schemas, directory: parma['database']!);
|
||||
|
||||
await isar.writeAsync((isar) {
|
||||
isar.fonts.clear();
|
||||
|
||||
@@ -310,6 +310,14 @@ class ThemeUtil {
|
||||
thickness: WidgetStateProperty.all(4.0),
|
||||
radius: const Radius.circular(2.0),
|
||||
),
|
||||
progressIndicatorTheme: const ProgressIndicatorThemeData(
|
||||
// ignore: deprecated_member_use
|
||||
year2023: false,
|
||||
),
|
||||
sliderTheme: const SliderThemeData(
|
||||
// ignore: deprecated_member_use
|
||||
year2023: false,
|
||||
),
|
||||
brightness: brightness,
|
||||
appBarTheme: AppBarTheme(
|
||||
surfaceTintColor: Colors.transparent,
|
||||
|
||||
Reference in New Issue
Block a user