generated from dellevin/template
新增毛玻璃主题
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user