generated from dellevin/template
新增毛玻璃主题
This commit is contained in:
@@ -13,6 +13,7 @@ import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../utils/image_path_helper.dart';
|
||||
import '../../widgets/genre_selector_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class BookAddPage extends StatefulWidget {
|
||||
final VoidCallback? onCancel;
|
||||
@@ -271,7 +272,7 @@ class _BookAddPageState extends State<BookAddPage> {
|
||||
|
||||
void _showCoverOptions() {
|
||||
final c = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(context: context, backgroundColor: c.surface,
|
||||
appModalBottomSheet(context: context, backgroundColor: c.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
builder: (ctx) => SafeArea(child: Padding(padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
@@ -301,7 +302,7 @@ class _BookAddPageState extends State<BookAddPage> {
|
||||
|
||||
Future<void> _pickCoverFromUrl() async {
|
||||
final ctrl = TextEditingController();
|
||||
final ok = await showDialog<bool>(context: context, builder: (ctx) {
|
||||
final ok = await appDialog<bool>(context: context, builder: (ctx) {
|
||||
final c = Theme.of(ctx).colorScheme;
|
||||
return AlertDialog(backgroundColor: c.surface, elevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
title: Text('添加网络图片', style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: c.onSurface)),
|
||||
|
||||
@@ -25,6 +25,7 @@ import '../character/character_list_page.dart';
|
||||
import '../../data/epub/reader_dao.dart';
|
||||
import '../epub_reader/epub_highlights_page.dart';
|
||||
import '../epub_reader/reader_screen.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 书籍详情页 - 极简主义设计
|
||||
class BookDetailPage extends StatefulWidget {
|
||||
@@ -627,7 +628,7 @@ class _BookDetailPageState extends State<BookDetailPage> {
|
||||
|
||||
void _showEditCoverOptions() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(context: context, backgroundColor: colors.surface,
|
||||
appModalBottomSheet(context: context, backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
builder: (ctx) => SafeArea(child: Padding(padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
@@ -661,7 +662,7 @@ class _BookDetailPageState extends State<BookDetailPage> {
|
||||
|
||||
Future<void> _pickEditCoverFromUrl() async {
|
||||
final urlCtrl = TextEditingController();
|
||||
final confirmed = await showDialog<bool>(context: context, builder: (ctx) {
|
||||
final confirmed = await appDialog<bool>(context: context, builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
return AlertDialog(backgroundColor: colors.surface, elevation: 0,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
@@ -1312,7 +1313,7 @@ class _BookDetailPageState extends State<BookDetailPage> {
|
||||
const names = ['默认样式', '毛玻璃层叠'];
|
||||
const icons = [Icons.article_outlined, Icons.blur_on_outlined];
|
||||
const subtitles = ['标准封面顶部布局', '封面背景 + 毛玻璃卡片'];
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -2173,7 +2174,7 @@ class _BookDetailPageState extends State<BookDetailPage> {
|
||||
|
||||
void _showDeleteDialog(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -7,6 +7,7 @@ import '../../utils/toast_util.dart';
|
||||
import '../../data/epub/reader_dao.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import 'book_excerpt_form_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 书籍摘抄列表页面
|
||||
class BookExcerptsPage extends StatefulWidget {
|
||||
@@ -363,7 +364,7 @@ class _BookExcerptsPageState extends State<BookExcerptsPage> {
|
||||
|
||||
Future<bool?> _showDeleteDialog(BookExcerpt excerpt) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
return showDialog<bool>(
|
||||
return appDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
@@ -407,7 +408,7 @@ class _BookExcerptsPageState extends State<BookExcerptsPage> {
|
||||
|
||||
void _showDeleteAllDialog() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
@@ -449,7 +450,7 @@ class _BookExcerptsPageState extends State<BookExcerptsPage> {
|
||||
|
||||
void _showImportSheet() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
isScrollControlled: true,
|
||||
@@ -532,7 +533,7 @@ class _BookExcerptsPageState extends State<BookExcerptsPage> {
|
||||
void _showWechatReadImport() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
isScrollControlled: true,
|
||||
|
||||
@@ -15,6 +15,7 @@ import '../../utils/image_path_helper.dart';
|
||||
import '../../widgets/genre_selector_page.dart';
|
||||
import '../../widgets/text_input_panel.dart';
|
||||
import '../../widgets/alternate_titles_dialog.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 从多值字段列表中提取去重排序的唯一值(供 compute 使用)
|
||||
List<String> _collectUnique(List<List<String>> lists) {
|
||||
@@ -394,7 +395,7 @@ class _BookFormPageState extends State<BookFormPage> {
|
||||
|
||||
Future<void> _pickCover() async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
await showModalBottomSheet(
|
||||
await appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -447,7 +448,7 @@ class _BookFormPageState extends State<BookFormPage> {
|
||||
|
||||
Future<void> _pickCoverFromUrl() async {
|
||||
final urlController = TextEditingController();
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final c = Theme.of(ctx).colorScheme;
|
||||
@@ -567,7 +568,7 @@ class _BookFormPageState extends State<BookFormPage> {
|
||||
/// 编辑书名(弹窗)
|
||||
Future<void> _editTitle() async {
|
||||
final controller = TextEditingController(text: _titleController.text);
|
||||
final result = await showDialog<String>(
|
||||
final result = await appDialog<String>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -615,7 +616,7 @@ class _BookFormPageState extends State<BookFormPage> {
|
||||
|
||||
/// 编辑别名(弹窗 + 标签式输入)
|
||||
Future<void> _editAlternateTitles() async {
|
||||
final result = await showDialog<List<String>>(
|
||||
final result = await appDialog<List<String>>(
|
||||
context: context,
|
||||
builder: (ctx) => AlternateTitlesDialog(initial: _alternateTitles),
|
||||
);
|
||||
@@ -643,7 +644,7 @@ class _BookFormPageState extends State<BookFormPage> {
|
||||
|
||||
Future<void> _editReadCount() async {
|
||||
final controller = TextEditingController(text: _readCount > 0 ? '$_readCount' : '');
|
||||
final result = await showDialog<String>(
|
||||
final result = await appDialog<String>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('阅读次数'),
|
||||
@@ -689,7 +690,7 @@ class _BookFormPageState extends State<BookFormPage> {
|
||||
Future<bool> _confirmLeave() async {
|
||||
if (!_hasContent()) return true;
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final result = await showDialog<bool>(
|
||||
final result = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
|
||||
@@ -4,6 +4,7 @@ import '../../models/data_models.dart';
|
||||
import '../../providers/app_provider.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import 'book_review_form_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 书评详情页
|
||||
class BookReviewDetailPage extends StatefulWidget {
|
||||
@@ -174,7 +175,7 @@ class _BookReviewDetailPageState extends State<BookReviewDetailPage> {
|
||||
|
||||
Future<void> _deleteReview() async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -6,6 +6,7 @@ import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import 'book_review_form_page.dart';
|
||||
import 'book_review_detail_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 书籍书评列表页面
|
||||
class BookReviewsPage extends StatefulWidget {
|
||||
@@ -286,7 +287,7 @@ class _BookReviewsPageState extends State<BookReviewsPage> {
|
||||
}
|
||||
|
||||
void _showDeleteDialog(BookReview review) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
|
||||
@@ -14,6 +14,7 @@ import '../../widgets/master_detail_scaffold.dart';
|
||||
import '../../widgets/detail_placeholder.dart';
|
||||
import 'book_detail_page.dart';
|
||||
import 'book_add_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 状态索引 → 状态值
|
||||
const _bookStatusMap = {0: 'read', 1: 'reading', 2: 'want_to_read', 3: 'abandoned'};
|
||||
@@ -412,7 +413,7 @@ class _BookTabViewState extends State<_BookTabView>
|
||||
|
||||
void _showDeleteDialog(BuildContext context, Book book) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -11,6 +11,7 @@ import '../../utils/image_path_helper.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import '../../widgets/genre_selector_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 角色编辑/添加页面
|
||||
///
|
||||
@@ -220,7 +221,7 @@ class _CharacterFormPageState extends State<CharacterFormPage> {
|
||||
|
||||
void _showImageOptions() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -277,7 +278,7 @@ class _CharacterFormPageState extends State<CharacterFormPage> {
|
||||
|
||||
Future<void> _pickImageFromUrl() async {
|
||||
String? url;
|
||||
final confirmed = await showDialog<bool>(context: context, builder: (ctx) {
|
||||
final confirmed = await appDialog<bool>(context: context, builder: (ctx) {
|
||||
final urlCtrl = TextEditingController();
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
return AlertDialog(
|
||||
@@ -424,7 +425,7 @@ class _CharacterFormPageState extends State<CharacterFormPage> {
|
||||
Future<bool> _confirmLeave() async {
|
||||
if (!_hasContent()) return true;
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final result = await showDialog<bool>(
|
||||
final result = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -5,6 +5,7 @@ import '../../providers/app_provider.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import 'character_form_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 影视角色列表页
|
||||
class MovieCharactersPage extends StatefulWidget {
|
||||
@@ -358,7 +359,7 @@ class _CharacterTile extends StatelessWidget {
|
||||
|
||||
void _showDeleteDialog(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'reader_style_sheet.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class ControlPanel extends StatefulWidget {
|
||||
final bool showControls;
|
||||
@@ -217,7 +218,7 @@ class _ControlPanelState extends State<ControlPanel> {
|
||||
|
||||
void _openStyleSheet() {
|
||||
widget.onToggleStyleDrawer();
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
|
||||
@@ -17,6 +17,7 @@ import 'epub_edit_page.dart';
|
||||
import 'epub_highlights_page.dart';
|
||||
import 'highlight_detail_sheet.dart';
|
||||
import 'reader_screen.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// EPUB 书籍详情页
|
||||
class EpubDetailPage extends StatefulWidget {
|
||||
@@ -730,7 +731,7 @@ class _EpubDetailPageState extends State<EpubDetailPage> {
|
||||
|
||||
/// 删除摘抄(同步删除蓝色高亮)
|
||||
Future<void> _deleteExcerpt(BookExcerpt excerpt, ColorScheme colors) async {
|
||||
final confirmed = showDialog<bool>(
|
||||
final confirmed = appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('删除摘抄', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
|
||||
@@ -774,7 +775,7 @@ class _EpubDetailPageState extends State<EpubDetailPage> {
|
||||
}
|
||||
|
||||
Future<void> _deleteHighlight(int id, ColorScheme colors) async {
|
||||
final confirmed = showDialog<bool>(
|
||||
final confirmed = appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('删除句读', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
|
||||
@@ -873,7 +874,7 @@ class _EpubDetailPageState extends State<EpubDetailPage> {
|
||||
}
|
||||
|
||||
void _showLinkedBookActions(ColorScheme colors, String title) {
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -914,7 +915,7 @@ class _EpubDetailPageState extends State<EpubDetailPage> {
|
||||
title: Text('取消关联', style: TextStyle(fontSize: 13, color: colors.error)),
|
||||
onTap: () {
|
||||
Navigator.pop(ctx);
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (confirmCtx) => AlertDialog(
|
||||
title: const Text('取消关联', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
|
||||
|
||||
@@ -6,6 +6,7 @@ import '../../utils/toast_util.dart';
|
||||
import '../../utils/user_prefs.dart';
|
||||
import 'highlight_detail_sheet.dart';
|
||||
import 'reader_screen.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// EPUB 句读(高亮)管理页面 —— 支持瀑布流/列表模式切换
|
||||
class EpubHighlightsPage extends StatefulWidget {
|
||||
@@ -317,7 +318,7 @@ class _EpubHighlightsPageState extends State<EpubHighlightsPage> {
|
||||
}
|
||||
|
||||
void _showDeleteConfirm(int id, ColorScheme colors) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -8,6 +8,7 @@ import '../../utils/toast_util.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import '../../widgets/shimmer_skeleton.dart';
|
||||
import 'epub_detail_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// EPUB 书架页面
|
||||
class EpubLibraryPage extends StatefulWidget {
|
||||
@@ -88,7 +89,7 @@ class _EpubLibraryPageState extends State<EpubLibraryPage> {
|
||||
}
|
||||
|
||||
if (!mounted) return;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (_) => const Center(child: CircularProgressIndicator()),
|
||||
@@ -107,7 +108,7 @@ class _EpubLibraryPageState extends State<EpubLibraryPage> {
|
||||
|
||||
Future<void> _deleteBook(Map<String, dynamic> book) async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final confirm = await showDialog<bool>(
|
||||
final confirm = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -166,7 +167,7 @@ class _EpubLibraryPageState extends State<EpubLibraryPage> {
|
||||
(2, '按阅读进度排序', Icons.auto_stories_outlined),
|
||||
(3, '按书名排序', Icons.sort_by_alpha),
|
||||
];
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import 'highlight_share_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 句读详情弹窗 —— 类似分享卡片的样式
|
||||
/// 从 epub_detail_page 和 epub_highlights_page 共用
|
||||
@@ -19,7 +20,7 @@ void showHighlightDetailSheet(
|
||||
final createdAt = highlight['created_at'] as String? ?? '';
|
||||
final bookTitle = book['title'] as String? ?? '';
|
||||
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
isScrollControlled: true,
|
||||
@@ -246,7 +247,7 @@ void showExcerptDetailSheet(
|
||||
}) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
isScrollControlled: true,
|
||||
|
||||
@@ -45,7 +45,7 @@ mixin _LinkHandlingMixin on State<ReaderScreen> {
|
||||
} else if (linkHandling == ReaderLinkHandling.ask) {
|
||||
if (mounted && context.mounted) {
|
||||
final shouldOpen =
|
||||
await showDialog<bool>(
|
||||
await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text('打开外部链接'),
|
||||
|
||||
@@ -23,6 +23,7 @@ import 'footnote_popup.dart';
|
||||
import 'search_sheet.dart';
|
||||
import 'epub_selection_toolbar.dart';
|
||||
import 'selection_handles.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
part 'mixins/spine_navigation_mixin.dart';
|
||||
part 'mixins/page_navigation_mixin.dart';
|
||||
@@ -439,7 +440,7 @@ class _ReaderScreenState extends State<ReaderScreen>
|
||||
}
|
||||
|
||||
void _openSearch() {
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import '../../services/epub/epub_theme.dart';
|
||||
import 'widgets/integer_stepper.dart';
|
||||
import 'widgets/reader_scale_slider.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// Simplified reader style configuration bottom sheet.
|
||||
///
|
||||
@@ -382,7 +383,7 @@ class _ReaderStyleSheetState extends State<ReaderStyleSheet> {
|
||||
Color bgColor = Color(_customBgColor);
|
||||
Color textColor = Color(_customTextColor);
|
||||
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
return StatefulBuilder(
|
||||
|
||||
@@ -8,6 +8,7 @@ import '../movies/movie_detail_page.dart';
|
||||
import '../movies/movie_form_page.dart';
|
||||
import '../book/book_detail_page.dart';
|
||||
import '../book/book_form_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 书影日历 - 按月展示影视/书籍添加记录
|
||||
class MediaCalendarPage extends StatefulWidget {
|
||||
@@ -457,7 +458,7 @@ class _MediaCalendarPageState extends State<MediaCalendarPage> {
|
||||
|
||||
void _showAddMenu(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
|
||||
@@ -13,6 +13,7 @@ import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../utils/image_path_helper.dart';
|
||||
import '../../widgets/genre_selector_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class GameAddPage extends StatefulWidget {
|
||||
final VoidCallback? onCancel;
|
||||
@@ -307,7 +308,7 @@ class _GameAddPageState extends State<GameAddPage> {
|
||||
|
||||
void _showCoverOptions() {
|
||||
final c = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(context: context, backgroundColor: c.surface,
|
||||
appModalBottomSheet(context: context, backgroundColor: c.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
builder: (ctx) => SafeArea(child: Padding(padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
@@ -337,7 +338,7 @@ class _GameAddPageState extends State<GameAddPage> {
|
||||
|
||||
Future<void> _pickCoverFromUrl() async {
|
||||
final ctrl = TextEditingController();
|
||||
final ok = await showDialog<bool>(context: context, builder: (ctx) {
|
||||
final ok = await appDialog<bool>(context: context, builder: (ctx) {
|
||||
final c = Theme.of(ctx).colorScheme;
|
||||
return AlertDialog(backgroundColor: c.surface, elevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
title: Text('添加网络图片', style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: c.onSurface)),
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'game_reviews_page.dart';
|
||||
import 'game_screenshots_page.dart';
|
||||
import 'game_share_page.dart';
|
||||
import '../character/character_list_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 游戏详情页 - 极简主义设计
|
||||
class GameDetailPage extends StatefulWidget {
|
||||
@@ -835,7 +836,7 @@ class _GameDetailPageState extends State<GameDetailPage> {
|
||||
|
||||
void _showEditCoverOptions() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context, backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
builder: (ctx) => SafeArea(
|
||||
@@ -875,7 +876,7 @@ class _GameDetailPageState extends State<GameDetailPage> {
|
||||
|
||||
Future<void> _pickEditCoverFromUrl() async {
|
||||
final urlCtrl = TextEditingController();
|
||||
final confirmed = await showDialog<bool>(context: context, builder: (ctx) {
|
||||
final confirmed = await appDialog<bool>(context: context, builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
return AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
@@ -1872,7 +1873,7 @@ class _GameDetailPageState extends State<GameDetailPage> {
|
||||
const names = ['默认样式', '毛玻璃层叠'];
|
||||
const icons = [Icons.article_outlined, Icons.blur_on_outlined];
|
||||
const subtitles = ['标准封面顶部布局', '封面背景 + 毛玻璃卡片'];
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -1917,7 +1918,7 @@ class _GameDetailPageState extends State<GameDetailPage> {
|
||||
|
||||
void _showDeleteDialog(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -14,6 +14,7 @@ import '../../utils/toast_util.dart';
|
||||
import '../../utils/image_path_helper.dart';
|
||||
import '../../widgets/genre_selector_page.dart';
|
||||
import '../../widgets/text_input_panel.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 从多值字段列表中提取去重排序的唯一值(供 compute 使用)
|
||||
List<String> _collectUnique(List<List<String>> lists) {
|
||||
@@ -833,7 +834,7 @@ class _GameFormPageState extends State<GameFormPage> {
|
||||
/// 显示封面选择选项
|
||||
void _showCoverOptions() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
@@ -904,7 +905,7 @@ class _GameFormPageState extends State<GameFormPage> {
|
||||
/// 从网络链接选择封面
|
||||
Future<void> _pickCoverFromUrl() async {
|
||||
final urlController = TextEditingController();
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -1001,7 +1002,7 @@ class _GameFormPageState extends State<GameFormPage> {
|
||||
/// 编辑游戏名称(弹窗)
|
||||
Future<void> _editTitle() async {
|
||||
final controller = TextEditingController(text: _titleController.text);
|
||||
final result = await showDialog<String>(
|
||||
final result = await appDialog<String>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -1049,7 +1050,7 @@ class _GameFormPageState extends State<GameFormPage> {
|
||||
|
||||
Future<void> _editPlayCount() async {
|
||||
final controller = TextEditingController(text: _playCount > 0 ? '$_playCount' : '');
|
||||
final result = await showDialog<String>(
|
||||
final result = await appDialog<String>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('游玩次数'),
|
||||
@@ -1076,7 +1077,7 @@ class _GameFormPageState extends State<GameFormPage> {
|
||||
final hoursController = TextEditingController(text: _playTimeHoursController.text);
|
||||
final minutesController = TextEditingController(text: _playTimeMinutesController.text);
|
||||
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -1185,7 +1186,7 @@ class _GameFormPageState extends State<GameFormPage> {
|
||||
Future<bool> _confirmLeave() async {
|
||||
if (!_hasContent()) return true;
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final result = await showDialog<bool>(
|
||||
final result = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -5,6 +5,7 @@ import '../../providers/app_provider.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import 'game_review_form_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 游戏评价详情页
|
||||
class GameReviewDetailPage extends StatefulWidget {
|
||||
@@ -41,7 +42,7 @@ class _GameReviewDetailPageState extends State<GameReviewDetailPage> {
|
||||
|
||||
Future<void> _deleteReview() async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -6,6 +6,7 @@ import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import 'game_review_form_page.dart';
|
||||
import 'game_review_detail_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 游戏评价列表页面
|
||||
class GameReviewsPage extends StatefulWidget {
|
||||
@@ -224,7 +225,7 @@ class _GameReviewsPageState extends State<GameReviewsPage> {
|
||||
}
|
||||
|
||||
void _showDeleteDialog(GameReview review) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
|
||||
@@ -12,6 +12,7 @@ import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../utils/image_path_helper.dart';
|
||||
import 'screenshot_gallery_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 游戏截图页面
|
||||
class GameScreenshotsPage extends StatefulWidget {
|
||||
@@ -147,7 +148,7 @@ class _GameScreenshotsPageState extends State<GameScreenshotsPage> {
|
||||
}
|
||||
|
||||
Future<void> _pickScreenshot() async {
|
||||
final result = await showModalBottomSheet<int>(
|
||||
final result = await appModalBottomSheet<int>(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -247,7 +248,7 @@ class _GameScreenshotsPageState extends State<GameScreenshotsPage> {
|
||||
|
||||
Future<void> _pickFromUrl() async {
|
||||
final urlController = TextEditingController();
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
@@ -332,7 +333,7 @@ class _GameScreenshotsPageState extends State<GameScreenshotsPage> {
|
||||
}
|
||||
|
||||
void _showDeleteDialog(GameScreenshot screenshot) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:share_plus/share_plus.dart';
|
||||
import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class GameSharePage extends StatefulWidget {
|
||||
final Game game;
|
||||
@@ -61,7 +62,7 @@ class _GameSharePageState extends State<GameSharePage> {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
const icons = [Icons.image_outlined, Icons.sports_esports_outlined];
|
||||
const subtitles = ['简约海报风格', '游戏信息卡风格'];
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
|
||||
@@ -14,6 +14,7 @@ import '../../widgets/master_detail_scaffold.dart';
|
||||
import '../../widgets/detail_placeholder.dart';
|
||||
import 'game_detail_page.dart';
|
||||
import 'game_add_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 状态索引 → 状态值
|
||||
const _gameStatusMap = {0: 'completed', 1: 'playing', 2: 'want_to_play', 3: 'abandoned'};
|
||||
@@ -519,7 +520,7 @@ class _GameTabViewState extends State<_GameTabView>
|
||||
|
||||
void _showDeleteDialog(BuildContext context, Game game) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -26,6 +26,7 @@ import 'main_content_page.dart';
|
||||
import '../online_search/search_page.dart';
|
||||
import '../online_search/online_search_page.dart';
|
||||
import '../profile/profile_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 主页 - 包含底部导航,可切换主页/我的
|
||||
class HomePage extends StatefulWidget {
|
||||
@@ -451,7 +452,7 @@ class _DesktopIconRail extends StatelessWidget {
|
||||
void _showSearchDialog(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final dialogHeight = (MediaQuery.of(context).size.height * 0.82).clamp(560.0, 820.0);
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (dialogCtx) => Dialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -473,7 +474,7 @@ class _DesktopIconRail extends StatelessWidget {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final email = 'dellevin99@gmail.com';
|
||||
final qqGroup = '1087203310';
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -536,40 +537,40 @@ class _DesktopIconRail extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
void _showBackupDialog(BuildContext context) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (_) => const _BackupChoiceDialog(),
|
||||
);
|
||||
}
|
||||
|
||||
void _showEncounterDialog(BuildContext context) {
|
||||
showDialog(context: context, builder: (_) => const _EncounterDialog());
|
||||
appDialog(context: context, builder: (_) => const _EncounterDialog());
|
||||
}
|
||||
|
||||
void _showStrollDialog(BuildContext context) {
|
||||
showDialog(context: context, builder: (_) => const _StrollDialog());
|
||||
appDialog(context: context, builder: (_) => const _StrollDialog());
|
||||
}
|
||||
|
||||
void _showCalendarDialog(BuildContext context) {
|
||||
showDialog(context: context, builder: (_) => const _CalendarDialog());
|
||||
appDialog(context: context, builder: (_) => const _CalendarDialog());
|
||||
}
|
||||
|
||||
void _showPersonDialog(BuildContext context) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (_) => const _PersonListDialog(),
|
||||
);
|
||||
}
|
||||
|
||||
void _showTagDialog(BuildContext context) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (_) => const _TagManagementDialog(),
|
||||
);
|
||||
}
|
||||
|
||||
void _showRecycleBinDialog(BuildContext context) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (_) => const _RecycleBinDialog(),
|
||||
);
|
||||
@@ -1165,7 +1166,7 @@ class _StrollDialogState extends State<_StrollDialog> {
|
||||
|
||||
void _showDeleteConfirm(_StrollItem item) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(context: context, builder: (ctx) => AlertDialog(
|
||||
appDialog(context: context, builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
title: Text('确认删除', style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: colors.onSurface)),
|
||||
@@ -2058,7 +2059,7 @@ class _TagManagementDialogState extends State<_TagManagementDialog> {
|
||||
final name = tag['name'] as String;
|
||||
final isHidden = (tag['is_hidden'] as int?) == 1;
|
||||
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(20))),
|
||||
@@ -2127,7 +2128,7 @@ class _TagManagementDialogState extends State<_TagManagementDialog> {
|
||||
} else {
|
||||
for (final n in provider.notes.where((n) => !n.isDeleted && n.tags.contains(tagName))) items.add((title: n.title.isNotEmpty ? n.title : '随手记', subtitle: null, type: '笔记'));
|
||||
}
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -2161,7 +2162,7 @@ class _TagManagementDialogState extends State<_TagManagementDialog> {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final controller = TextEditingController();
|
||||
final type = _currentType;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
@@ -2208,7 +2209,7 @@ class _TagManagementDialogState extends State<_TagManagementDialog> {
|
||||
final tagId = tag['id'] as String;
|
||||
final type = tag['type'] as String;
|
||||
final oldName = tag['name'] as String;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
@@ -2250,7 +2251,7 @@ class _TagManagementDialogState extends State<_TagManagementDialog> {
|
||||
bool showAdvanced = false;
|
||||
final otherTags = (_tagCache[type] ?? []).where((t) => t['id'] != tagId).map((t) => t['name'] as String).toList();
|
||||
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => StatefulBuilder(builder: (ctx, setDialogState) {
|
||||
final bc = Theme.of(ctx).colorScheme;
|
||||
@@ -2625,7 +2626,7 @@ class _LocalBackupContentState extends State<_LocalBackupContent> {
|
||||
}
|
||||
|
||||
Future<void> _importData() async {
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -2820,7 +2821,7 @@ class _WebDAVBackupContentState extends State<_WebDAVBackupContent> {
|
||||
|
||||
Future<void> _confirmSync(SyncDirection direction) async {
|
||||
final isUpload = direction == SyncDirection.upload;
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -2844,7 +2845,7 @@ class _WebDAVBackupContentState extends State<_WebDAVBackupContent> {
|
||||
}
|
||||
|
||||
Future<void> _clearConfig() async {
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -3343,7 +3344,7 @@ class _RecycleBinDialogState extends State<_RecycleBinDialog> {
|
||||
|
||||
Future<void> _permanentDelete(_BinItem item) async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
@@ -3382,7 +3383,7 @@ class _RecycleBinDialogState extends State<_RecycleBinDialog> {
|
||||
|
||||
void _showClearAllDialog() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
@@ -4007,7 +4008,7 @@ class _DesktopListPanelState extends State<_DesktopListPanel> {
|
||||
|
||||
Future<void> _deleteItem(BuildContext context, String type, String id, String title) async {
|
||||
final provider = context.read<AppProvider>();
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: Theme.of(ctx).colorScheme.surface,
|
||||
@@ -4463,7 +4464,7 @@ class _DesktopNoteItem extends StatelessWidget {
|
||||
// 进入编辑模式由 NoteDetailPage 处理
|
||||
break;
|
||||
case 'delete':
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: Theme.of(ctx).colorScheme.surface,
|
||||
|
||||
@@ -10,6 +10,7 @@ import '../note/note_tab_page.dart';
|
||||
import '../game/game_tab_page.dart';
|
||||
import '../online_search/search_hub_page.dart';
|
||||
import '../sync/webdav_sync_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 主内容页 - 观影/阅读/笔记标签页(PageView 滑动切换)
|
||||
class MainContentPage extends StatefulWidget {
|
||||
@@ -149,7 +150,7 @@ class _MainContentPageState extends State<MainContentPage> {
|
||||
void _showModulePicker(BuildContext context, List<_TabItem> tabs, int currentIndex) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final provider = context.read<AppProvider>();
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -211,7 +212,7 @@ class _MainContentPageState extends State<MainContentPage> {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final hasConfig = (await WebDAVService.instance.getConfig()) != null;
|
||||
if (!mounted) return;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(20))),
|
||||
@@ -331,7 +332,7 @@ class _MainContentPageState extends State<MainContentPage> {
|
||||
|
||||
void _showSortMenu(BuildContext context, String title, int current, List<(int, String, IconData)> options, ValueChanged<int> onSelected) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -663,7 +664,7 @@ class _CloudSheetContentState extends State<_CloudSheetContent> {
|
||||
// 使用保存的 navigator context,而非 state context(bottom sheet 已 pop)
|
||||
final overlayCtx = navigator.context;
|
||||
final colors = Theme.of(overlayCtx).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: overlayCtx,
|
||||
builder: (dialogCtx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:path/path.dart' as p;
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import '../../utils/user_prefs.dart';
|
||||
import 'md_viewer_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// Markdown 阅读器 - 文件浏览器
|
||||
class MdReaderTabPage extends StatefulWidget {
|
||||
@@ -88,7 +89,7 @@ class _MdReaderTabPageState extends State<MdReaderTabPage> {
|
||||
}
|
||||
|
||||
void _showPermissionDeniedDialog() {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -276,7 +277,7 @@ class _MdReaderTabPageState extends State<MdReaderTabPage> {
|
||||
}
|
||||
|
||||
void _showSettingsSheet() {
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 豆瓣影视WebView页面 - 用于抓取影视信息
|
||||
class DoubanWebViewPage extends StatefulWidget {
|
||||
@@ -139,7 +140,7 @@ class _DoubanWebViewPageState extends State<DoubanWebViewPage> {
|
||||
|
||||
// 显示提取的信息
|
||||
if (mounted) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -242,7 +243,7 @@ class _DoubanWebViewPageState extends State<DoubanWebViewPage> {
|
||||
_isExtracting = true;
|
||||
|
||||
// 显示加载提示
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (dialogContext) => const Center(
|
||||
|
||||
@@ -13,6 +13,7 @@ import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../utils/image_path_helper.dart';
|
||||
import '../../widgets/genre_selector_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class MovieAddPage extends StatefulWidget {
|
||||
final VoidCallback? onCancel;
|
||||
@@ -281,7 +282,7 @@ class _MovieAddPageState extends State<MovieAddPage> {
|
||||
|
||||
void _showCoverOptions() {
|
||||
final c = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(context: context, backgroundColor: c.surface,
|
||||
appModalBottomSheet(context: context, backgroundColor: c.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
builder: (ctx) => SafeArea(child: Padding(padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
@@ -311,7 +312,7 @@ class _MovieAddPageState extends State<MovieAddPage> {
|
||||
|
||||
Future<void> _pickCoverFromUrl() async {
|
||||
final ctrl = TextEditingController();
|
||||
final ok = await showDialog<bool>(context: context, builder: (ctx) {
|
||||
final ok = await appDialog<bool>(context: context, builder: (ctx) {
|
||||
final c = Theme.of(ctx).colorScheme;
|
||||
return AlertDialog(backgroundColor: c.surface, elevation: 0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
title: Text('添加网络图片', style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: c.onSurface)),
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'movie_reviews_page.dart';
|
||||
import 'movie_posters_page.dart';
|
||||
import 'movie_share_page.dart';
|
||||
import '../character/character_list_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 影视详情页 - 极简主义设计
|
||||
class MovieDetailPage extends StatefulWidget {
|
||||
@@ -786,7 +787,7 @@ class _MovieDetailPageState extends State<MovieDetailPage> {
|
||||
|
||||
void _showEditCoverOptions() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context, backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
builder: (ctx) => SafeArea(
|
||||
@@ -826,7 +827,7 @@ class _MovieDetailPageState extends State<MovieDetailPage> {
|
||||
|
||||
Future<void> _pickEditCoverFromUrl() async {
|
||||
final urlCtrl = TextEditingController();
|
||||
final confirmed = await showDialog<bool>(context: context, builder: (ctx) {
|
||||
final confirmed = await appDialog<bool>(context: context, builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
return AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
@@ -1197,7 +1198,7 @@ class _MovieDetailPageState extends State<MovieDetailPage> {
|
||||
const names = ['默认样式', '毛玻璃层叠'];
|
||||
const icons = [Icons.article_outlined, Icons.blur_on_outlined];
|
||||
const subtitles = ['标准封面顶部布局', '封面背景 + 毛玻璃卡片'];
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -2103,7 +2104,7 @@ class _MovieDetailPageState extends State<MovieDetailPage> {
|
||||
|
||||
void _showDeleteDialog(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -16,6 +16,7 @@ import '../../widgets/genre_selector_page.dart';
|
||||
import '../../widgets/text_input_panel.dart';
|
||||
import '../../widgets/duration_picker.dart';
|
||||
import '../../widgets/alternate_titles_dialog.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 从多值字段列表中提取去重排序的唯一值(供 compute 使用)
|
||||
List<String> _collectUnique(List<List<String>> lists) {
|
||||
@@ -147,7 +148,7 @@ class _MovieFormPageState extends State<MovieFormPage> {
|
||||
void _showQuickAddDialog() {
|
||||
final textController = TextEditingController();
|
||||
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (dialogContext) {
|
||||
final colors = Theme.of(dialogContext).colorScheme;
|
||||
@@ -748,7 +749,7 @@ class _MovieFormPageState extends State<MovieFormPage> {
|
||||
/// 编辑名称(弹窗)
|
||||
Future<void> _editTitle() async {
|
||||
final controller = TextEditingController(text: _titleController.text);
|
||||
final result = await showDialog<String>(
|
||||
final result = await appDialog<String>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -796,7 +797,7 @@ class _MovieFormPageState extends State<MovieFormPage> {
|
||||
|
||||
/// 编辑别名(弹窗 + 标签式输入)
|
||||
Future<void> _editAlternateTitles() async {
|
||||
final result = await showDialog<List<String>>(
|
||||
final result = await appDialog<List<String>>(
|
||||
context: context,
|
||||
builder: (ctx) => AlternateTitlesDialog(initial: _alternateTitles),
|
||||
);
|
||||
@@ -807,7 +808,7 @@ class _MovieFormPageState extends State<MovieFormPage> {
|
||||
/// 编辑观看次数
|
||||
Future<void> _editWatchCount() async {
|
||||
final controller = TextEditingController(text: _watchCount > 0 ? '$_watchCount' : '');
|
||||
final result = await showDialog<String>(
|
||||
final result = await appDialog<String>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('观看次数'),
|
||||
@@ -1118,7 +1119,7 @@ class _MovieFormPageState extends State<MovieFormPage> {
|
||||
/// 显示封面选择选项
|
||||
void _showCoverOptions() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
@@ -1292,7 +1293,7 @@ class _MovieFormPageState extends State<MovieFormPage> {
|
||||
Future<void> _pickCoverFromUrl() async {
|
||||
final urlController = TextEditingController();
|
||||
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -1400,7 +1401,7 @@ class _MovieFormPageState extends State<MovieFormPage> {
|
||||
Future<bool> _confirmLeave() async {
|
||||
if (!_hasContent()) return true;
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final result = await showDialog<bool>(
|
||||
final result = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -12,6 +12,7 @@ import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../utils/image_path_helper.dart';
|
||||
import 'poster_gallery_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 影视海报墙页面
|
||||
class MoviePostersPage extends StatefulWidget {
|
||||
@@ -184,7 +185,7 @@ class _MoviePostersPageState extends State<MoviePostersPage> {
|
||||
|
||||
Future<void> _pickPoster() async {
|
||||
// 显示选择对话框
|
||||
final result = await showModalBottomSheet<int>(
|
||||
final result = await appModalBottomSheet<int>(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
shape: const RoundedRectangleBorder(
|
||||
@@ -311,7 +312,7 @@ class _MoviePostersPageState extends State<MoviePostersPage> {
|
||||
Future<void> _pickFromUrl() async {
|
||||
final urlController = TextEditingController();
|
||||
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
@@ -504,7 +505,7 @@ class _MoviePostersPageState extends State<MoviePostersPage> {
|
||||
}
|
||||
|
||||
void _showDeleteDialog(MoviePoster poster) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
|
||||
@@ -5,6 +5,7 @@ import '../../providers/app_provider.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import 'movie_review_form_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 影评详情页
|
||||
class MovieReviewDetailPage extends StatefulWidget {
|
||||
@@ -45,7 +46,7 @@ class _MovieReviewDetailPageState extends State<MovieReviewDetailPage> {
|
||||
|
||||
Future<void> _deleteReview() async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -6,6 +6,7 @@ import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import 'movie_review_form_page.dart';
|
||||
import 'movie_review_detail_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 影视影评列表页面
|
||||
class MovieReviewsPage extends StatefulWidget {
|
||||
@@ -286,7 +287,7 @@ class _MovieReviewsPageState extends State<MovieReviewsPage> {
|
||||
}
|
||||
|
||||
void _showDeleteDialog(MovieReview review) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:share_plus/share_plus.dart';
|
||||
import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class MovieSharePage extends StatefulWidget {
|
||||
final Movie movie;
|
||||
@@ -128,7 +129,7 @@ class _MovieSharePageState extends State<MovieSharePage> {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
const icons = [Icons.image_outlined, Icons.confirmation_num_outlined, Icons.local_movies_outlined, Icons.card_giftcard_outlined];
|
||||
const subtitles = ['简约海报风格', '经典复古票根', '电影票票根样式', '高端收藏版票根'];
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -185,7 +186,7 @@ class _MovieSharePageState extends State<MovieSharePage> {
|
||||
|
||||
void _showEditSheet() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -15,6 +15,7 @@ import '../../widgets/master_detail_scaffold.dart';
|
||||
import '../../widgets/detail_placeholder.dart';
|
||||
import 'movie_detail_page.dart';
|
||||
import 'movie_add_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 状态索引 → 状态值
|
||||
const _statusMap = {0: 'watched', 1: 'watching', 2: 'want_to_watch'};
|
||||
@@ -530,7 +531,7 @@ class _MovieTabViewState extends State<_MovieTabView>
|
||||
|
||||
void _showDeleteDialog(BuildContext context, Movie movie) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -15,6 +15,7 @@ import '../../utils/responsive.dart';
|
||||
import '../../widgets/vditor_editor.dart';
|
||||
import '../../widgets/tag_side_panel.dart';
|
||||
import 'note_share_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 笔记详情页
|
||||
class NoteDetailPage extends StatefulWidget {
|
||||
@@ -804,7 +805,7 @@ class _NoteDetailPageState extends State<NoteDetailPage> {
|
||||
}
|
||||
|
||||
void _showImagePreview(List<String> images, int initialIndex) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
builder: (context) => GestureDetector(
|
||||
@@ -920,7 +921,7 @@ class _NoteDetailPageState extends State<NoteDetailPage> {
|
||||
|
||||
void _showDeleteDialog(BuildContext context) {
|
||||
final errorColor = Theme.of(context).colorScheme.error;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('删除笔记'),
|
||||
|
||||
@@ -13,6 +13,7 @@ import '../../utils/image_saver.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import '../../widgets/tag_side_panel.dart';
|
||||
import '../../widgets/vditor_editor.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 添加/编辑笔记页面 - 极简书写界面
|
||||
class NoteFormPage extends StatefulWidget {
|
||||
@@ -625,7 +626,7 @@ class _NoteFormPageState extends State<NoteFormPage> {
|
||||
_autoSaveTimer?.cancel();
|
||||
if (!_hasContent()) return true;
|
||||
|
||||
final result = await showDialog<String>(
|
||||
final result = await appDialog<String>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -899,7 +900,7 @@ class _NoteFormPageState extends State<NoteFormPage> {
|
||||
|
||||
/// 显示图片预览
|
||||
void _showImagePreview(int index) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
builder: (context) => GestureDetector(
|
||||
@@ -926,7 +927,7 @@ class _NoteFormPageState extends State<NoteFormPage> {
|
||||
|
||||
/// 显示删除图片确认对话框
|
||||
void _showDeleteImageDialog(int index) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
|
||||
@@ -11,6 +11,7 @@ import '../../widgets/master_detail_scaffold.dart';
|
||||
import '../../widgets/detail_placeholder.dart';
|
||||
import 'note_detail_page.dart';
|
||||
import 'note_add_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 笔记标签页(分页 + 触底加载)
|
||||
class NoteTabPage extends StatefulWidget {
|
||||
@@ -355,7 +356,7 @@ class _NoteTabPageState extends State<NoteTabPage> {
|
||||
|
||||
void _showNoteActions(Note note) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -398,7 +399,7 @@ class _NoteTabPageState extends State<NoteTabPage> {
|
||||
|
||||
void _showDeleteDialog(Note note) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -12,6 +12,7 @@ import '../../models/data_models.dart';
|
||||
import '../../providers/app_provider.dart';
|
||||
import '../../utils/image_path_helper.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 书籍详情页 - 在线版
|
||||
class BookDetailPage extends StatefulWidget {
|
||||
@@ -227,7 +228,7 @@ class _BookDetailPageState extends State<BookDetailPage> {
|
||||
|
||||
void _showAddSheet() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
|
||||
@@ -15,6 +15,7 @@ import '../../models/data_models.dart';
|
||||
import '../../providers/app_provider.dart';
|
||||
import '../../utils/image_path_helper.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 影视详情页 - 在线版
|
||||
class MovieDetailPage extends StatefulWidget {
|
||||
@@ -318,7 +319,7 @@ class _MovieDetailPageState extends State<MovieDetailPage>
|
||||
Future<void> _showRateSheet() async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final rates = [0.5, 0.75, 1.0, 1.25, 1.5, 2.0];
|
||||
final selected = await showModalBottomSheet<double>(
|
||||
final selected = await appModalBottomSheet<double>(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
@@ -547,7 +548,7 @@ class _MovieDetailPageState extends State<MovieDetailPage>
|
||||
|
||||
void _showAddSheet() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
|
||||
@@ -6,6 +6,7 @@ import '../../utils/user_prefs.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import 'movie_detail_page.dart';
|
||||
import 'book_detail_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 在线搜索影视/书籍(带 Scaffold + AppBar)
|
||||
class OnlineSearchPage extends StatelessWidget {
|
||||
@@ -143,7 +144,7 @@ class _OnlineSearchPageBodyState extends State<OnlineSearchPageBody> {
|
||||
|
||||
void _showUnlockDialog() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -499,7 +500,7 @@ class _OnlineSearchPageBodyState extends State<OnlineSearchPageBody> {
|
||||
}
|
||||
|
||||
void _showTokenExpiredDialog() {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final c = Theme.of(ctx).colorScheme;
|
||||
@@ -982,7 +983,7 @@ class _OnlineSearchPageBodyState extends State<OnlineSearchPageBody> {
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final c = Theme.of(ctx).colorScheme;
|
||||
@@ -1057,7 +1058,7 @@ class _OnlineSearchPageBodyState extends State<OnlineSearchPageBody> {
|
||||
_doSearch();
|
||||
},
|
||||
onLongPress: () {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final c = Theme.of(ctx).colorScheme;
|
||||
|
||||
@@ -10,6 +10,7 @@ import '../movies/movie_detail_page.dart';
|
||||
import '../book/book_detail_page.dart';
|
||||
import '../game/game_detail_page.dart';
|
||||
import 'person_form_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 人物档案详情页
|
||||
class PersonDetailPage extends StatefulWidget {
|
||||
@@ -464,7 +465,7 @@ class _PersonDetailPageState extends State<PersonDetailPage> {
|
||||
|
||||
void _showDeleteDialog(Person person) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -11,6 +11,7 @@ import '../../utils/image_path_helper.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import '../../widgets/genre_selector_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 人物编辑/添加页面
|
||||
class PersonFormPage extends StatefulWidget {
|
||||
@@ -259,7 +260,7 @@ class _PersonFormPageState extends State<PersonFormPage> {
|
||||
|
||||
void _showPhotoOptions() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -311,7 +312,7 @@ class _PersonFormPageState extends State<PersonFormPage> {
|
||||
|
||||
Future<void> _pickPhotoFromUrl() async {
|
||||
String? url;
|
||||
final confirmed = await showDialog<bool>(context: context, builder: (ctx) {
|
||||
final confirmed = await appDialog<bool>(context: context, builder: (ctx) {
|
||||
final urlCtrl = TextEditingController();
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
return AlertDialog(
|
||||
@@ -503,7 +504,7 @@ class _PersonFormPageState extends State<PersonFormPage> {
|
||||
Future<bool> _confirmLeave() async {
|
||||
if (!_hasContent()) return true;
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final result = await showDialog<bool>(
|
||||
final result = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface, elevation: 0,
|
||||
|
||||
@@ -8,6 +8,7 @@ import '../../utils/toast_util.dart';
|
||||
import '../../widgets/person_avatar.dart';
|
||||
import 'person_detail_page.dart';
|
||||
import 'person_form_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 人物列表页
|
||||
class PersonListPage extends StatefulWidget {
|
||||
@@ -526,7 +527,7 @@ class _PersonListPageState extends State<PersonListPage> {
|
||||
Future<void> _refreshRelations() async {
|
||||
final provider = context.read<AppProvider>();
|
||||
// 显示加载弹窗
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (ctx) => PopScope(
|
||||
|
||||
@@ -6,6 +6,7 @@ import '../../utils/user_prefs.dart';
|
||||
import '../../widgets/fade_in_local_image.dart';
|
||||
import 'playlist_create_page.dart';
|
||||
import 'playlist_detail_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class PlaylistListPage extends StatefulWidget {
|
||||
const PlaylistListPage({super.key});
|
||||
@@ -561,7 +562,7 @@ class _PlaylistListPageState extends State<PlaylistListPage> {
|
||||
|
||||
void _showActionSheet(BuildContext context, Playlist playlist, AppProvider provider) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -642,7 +643,7 @@ class _PlaylistListPageState extends State<PlaylistListPage> {
|
||||
|
||||
Future<bool?> _showDeleteDialog(BuildContext context, Playlist playlist, AppProvider provider) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
return showDialog<bool>(
|
||||
return appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../../services/changelog_service.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 更新日志页面
|
||||
class ChangelogPage extends StatefulWidget {
|
||||
@@ -55,7 +56,7 @@ class _ChangelogPageState extends State<ChangelogPage> {
|
||||
|
||||
void _showNoUpdateDialog(String localVersion) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -77,7 +78,7 @@ class _ChangelogPageState extends State<ChangelogPage> {
|
||||
|
||||
void _showUpdateDialog({required String version, String? localVersion}) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../utils/user_prefs.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class FeatureSettingsPage extends StatefulWidget {
|
||||
const FeatureSettingsPage({super.key});
|
||||
@@ -442,7 +443,7 @@ class _FeatureSettingsPageState extends State<FeatureSettingsPage> {
|
||||
void _showDefaultTabPicker() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final enabled = _enabledTabs;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (ctx) => Container(
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:permission_handler/permission_handler.dart';
|
||||
import '../../services/font_download_manager.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../utils/user_prefs.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 字体选择页面
|
||||
///
|
||||
@@ -59,7 +60,7 @@ class _FontPickerPageState extends State<FontPickerPage> {
|
||||
/// 显示权限提示弹窗
|
||||
void _showPermissionDialog() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../providers/app_provider.dart';
|
||||
import '../../utils/user_prefs.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class LayoutSettingsPage extends StatefulWidget {
|
||||
const LayoutSettingsPage({super.key});
|
||||
@@ -337,7 +338,7 @@ class _LayoutSettingsPageState extends State<LayoutSettingsPage> {
|
||||
|
||||
void _showHomeModuleSheet() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -380,7 +381,7 @@ class _LayoutSettingsPageState extends State<LayoutSettingsPage> {
|
||||
|
||||
void _showMovieSheet() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -445,7 +446,7 @@ class _LayoutSettingsPageState extends State<LayoutSettingsPage> {
|
||||
|
||||
void _showBookSheet() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -502,7 +503,7 @@ class _LayoutSettingsPageState extends State<LayoutSettingsPage> {
|
||||
|
||||
void _showNoteSheet() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -538,7 +539,7 @@ class _LayoutSettingsPageState extends State<LayoutSettingsPage> {
|
||||
|
||||
void _showGameSheet() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
|
||||
@@ -21,6 +21,7 @@ import '../explore/stroll_page.dart';
|
||||
import '../sync/cloud_sync_page.dart';
|
||||
import 'settings_page.dart';
|
||||
import 'watchlist_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 个人中心页面
|
||||
class ProfilePage extends StatefulWidget {
|
||||
@@ -1053,7 +1054,7 @@ class _ProfilePageState extends State<ProfilePage> with RouteAware {
|
||||
void _showFeedbackDialog(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final email = 'dellevin99@gmail.com';
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
@@ -1210,7 +1211,7 @@ class _ProfilePageState extends State<ProfilePage> with RouteAware {
|
||||
|
||||
Future<void> _pickAvatar() async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
await showModalBottomSheet(
|
||||
await appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
@@ -1312,7 +1313,7 @@ class _ProfilePageState extends State<ProfilePage> with RouteAware {
|
||||
|
||||
void _showBackupOptions(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
@@ -1414,7 +1415,7 @@ class _ProfilePageState extends State<ProfilePage> with RouteAware {
|
||||
}
|
||||
options.add(('笔记', Icons.sticky_note_2_outlined, provider.notes.where((n) => !n.isDeleted).length));
|
||||
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(
|
||||
@@ -1515,7 +1516,7 @@ class _ProfilePageState extends State<ProfilePage> with RouteAware {
|
||||
|
||||
void _showExportResult(BuildContext context, bool success, String message) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
icon: Icon(
|
||||
|
||||
@@ -20,6 +20,7 @@ import 'feature_settings_page.dart';
|
||||
import 'layout_settings_page.dart';
|
||||
import 'changelog_page.dart';
|
||||
import 'font_picker_page.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 设置页面
|
||||
class SettingsPage extends StatefulWidget {
|
||||
@@ -263,7 +264,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final nicknameController = TextEditingController(text: _userPrefs.nickname);
|
||||
final mottoController = TextEditingController(text: _userPrefs.motto);
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -351,11 +352,12 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
);
|
||||
}
|
||||
|
||||
static const _themeModeLabels = ['跟随系统', '浅色模式', '深色模式'];
|
||||
static const _themeModeLabels = ['跟随系统', '浅色模式', '深色模式', '毛玻璃'];
|
||||
static const _themeModeIcons = [
|
||||
Icons.brightness_auto,
|
||||
Icons.light_mode,
|
||||
Icons.dark_mode
|
||||
Icons.dark_mode,
|
||||
Icons.blur_on
|
||||
];
|
||||
|
||||
Widget _buildThemeModeSelector() {
|
||||
@@ -401,7 +403,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
|
||||
void _showThemeModePicker() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (ctx) => Container(
|
||||
@@ -464,6 +466,13 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
|
||||
Future<void> _setThemeMode(int mode) async {
|
||||
await _userPrefs.setThemeMode(mode);
|
||||
if (mode == 3) {
|
||||
if (mounted) {
|
||||
context.read<AppProvider>().enableFrosted();
|
||||
setState(() => _themeMode = mode);
|
||||
}
|
||||
return;
|
||||
}
|
||||
final themeMode = switch (mode) {
|
||||
1 => ThemeMode.light,
|
||||
2 => ThemeMode.dark,
|
||||
@@ -527,7 +536,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
void _showColorSchemePicker() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final provider = context.read<AppProvider>();
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (ctx) => Container(
|
||||
@@ -904,7 +913,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
|
||||
void _showStoragePermissionDialog() {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -945,7 +954,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
void _showClearCacheDialog(BuildContext pageContext) async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
// 先扫描分析
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: pageContext,
|
||||
barrierDismissible: false,
|
||||
builder: (_) => Center(child: CircularProgressIndicator(color: colors.primary)),
|
||||
@@ -968,7 +977,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
return;
|
||||
}
|
||||
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: pageContext,
|
||||
builder: (dialogContext) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -1038,7 +1047,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
|
||||
Future<void> _clearCacheData(BuildContext context) async {
|
||||
try {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (_) => const Center(child: CircularProgressIndicator()));
|
||||
@@ -1058,7 +1067,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
void _showCacheResult(
|
||||
BuildContext context, bool success, String message, bool cleaned) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
icon: Icon(
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:provider/provider.dart';
|
||||
import '../../providers/app_provider.dart';
|
||||
import '../../models/data_models.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 回收站页面
|
||||
class RecycleBinPage extends StatefulWidget {
|
||||
@@ -441,7 +442,7 @@ class _RecycleBinPageState extends State<RecycleBinPage> {
|
||||
}
|
||||
|
||||
Future<void> _restore(_DeletedItem item) async {
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||
@@ -548,7 +549,7 @@ class _RecycleBinPageState extends State<RecycleBinPage> {
|
||||
|
||||
Future<bool> _showConfirmDialog(String message) async {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final result = await showDialog<bool>(
|
||||
final result = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -582,7 +583,7 @@ class _RecycleBinPageState extends State<RecycleBinPage> {
|
||||
void _showClearAllDialog() {
|
||||
final pageContext = context;
|
||||
final colors = Theme.of(pageContext).colorScheme;
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: pageContext,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../providers/app_provider.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
class TagManagementPage extends StatefulWidget {
|
||||
const TagManagementPage({super.key});
|
||||
@@ -561,7 +562,7 @@ class _TagManagementPageState extends State<TagManagementPage> {
|
||||
final name = tag['name'] as String;
|
||||
final isHidden = (tag['is_hidden'] as int?) == 1;
|
||||
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(20))),
|
||||
@@ -680,7 +681,7 @@ class _TagManagementPageState extends State<TagManagementPage> {
|
||||
}
|
||||
}
|
||||
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(16))),
|
||||
@@ -762,7 +763,7 @@ class _TagManagementPageState extends State<TagManagementPage> {
|
||||
.where((t) => (t['id'] as String) != tagId && !descendants.contains(t['id'] as String))
|
||||
.toList();
|
||||
|
||||
showModalBottomSheet(
|
||||
appModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: colors.surface,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(20))),
|
||||
@@ -857,7 +858,7 @@ class _TagManagementPageState extends State<TagManagementPage> {
|
||||
final controller = TextEditingController();
|
||||
final type = _currentType;
|
||||
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -927,7 +928,7 @@ class _TagManagementPageState extends State<TagManagementPage> {
|
||||
final type = tag['type'] as String;
|
||||
final oldName = tag['name'] as String;
|
||||
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: colors.surface,
|
||||
@@ -995,7 +996,7 @@ class _TagManagementPageState extends State<TagManagementPage> {
|
||||
.map((t) => t['name'] as String)
|
||||
.toList();
|
||||
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) => StatefulBuilder(
|
||||
builder: (ctx, setDialogState) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import '../../providers/app_provider.dart';
|
||||
import '../../services/sync/backup_service.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../utils/user_prefs.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// 本地备份页面
|
||||
class BackupPage extends StatefulWidget {
|
||||
@@ -500,7 +501,7 @@ class _BackupPageState extends State<BackupPage> {
|
||||
required String content,
|
||||
String? detail,
|
||||
}) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -600,7 +601,7 @@ class _BackupPageState extends State<BackupPage> {
|
||||
/// 导入数据
|
||||
Future<void> _importData() async {
|
||||
// 显示确认对话框
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:provider/provider.dart';
|
||||
import '../../utils/toast_util.dart';
|
||||
import '../../services/sync/webdav_service.dart';
|
||||
import '../../providers/app_provider.dart';
|
||||
import '../../widgets/app_overlay.dart';
|
||||
|
||||
/// WebDAV 备份页面
|
||||
class WebDAVSyncPage extends StatefulWidget {
|
||||
@@ -183,7 +184,7 @@ class _WebDAVSyncPageState extends State<WebDAVSyncPage> {
|
||||
}
|
||||
|
||||
void _showResultDialog(String title, String content) {
|
||||
showDialog(
|
||||
appDialog(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -231,7 +232,7 @@ class _WebDAVSyncPageState extends State<WebDAVSyncPage> {
|
||||
}
|
||||
|
||||
Future<void> _showUploadConfirm() async {
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -269,7 +270,7 @@ class _WebDAVSyncPageState extends State<WebDAVSyncPage> {
|
||||
}
|
||||
|
||||
Future<void> _showDownloadConfirm() async {
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
@@ -307,7 +308,7 @@ class _WebDAVSyncPageState extends State<WebDAVSyncPage> {
|
||||
}
|
||||
|
||||
Future<void> _clearConfig() async {
|
||||
final confirmed = await showDialog<bool>(
|
||||
final confirmed = await appDialog<bool>(
|
||||
context: context,
|
||||
builder: (ctx) {
|
||||
final colors = Theme.of(ctx).colorScheme;
|
||||
|
||||
Reference in New Issue
Block a user