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 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,
|
||||
|
||||
Reference in New Issue
Block a user