数据备份

This commit is contained in:
DelLevin-Home
2026-03-07 11:55:27 +08:00
parent 082145ff79
commit 874e21708a
21 changed files with 73 additions and 512 deletions

View File

@@ -6,6 +6,7 @@ import 'package:provider/provider.dart';
import 'package:uuid/uuid.dart';
import '../providers/app_provider.dart';
import '../models/data_models.dart';
import '../utils/toast_util.dart';
/// 添加/编辑影视记录页面Typecho 风格)
class MovieFormPage extends StatefulWidget {
@@ -527,23 +528,12 @@ class _MovieFormPageState extends State<MovieFormPage> {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(widget.movie == null ? '添加成功' : '更新成功'),
behavior: SnackBarBehavior.floating,
),
);
ToastUtil.show(context, widget.movie == null ? '添加成功' : '更新成功');
Navigator.pop(context);
} catch (e) {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('保存失败:$e'),
behavior: SnackBarBehavior.floating,
backgroundColor: Colors.red,
),
);
ToastUtil.show(context, '保存失败:$e');
} finally {
if (mounted) {
setState(() {