屏幕适配

This commit is contained in:
2026-06-04 14:34:46 +08:00
parent 02c1c87b46
commit 5ddcb95358
17 changed files with 286 additions and 126 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class AppEmptyView extends StatelessWidget {
const AppEmptyView({
@@ -19,15 +20,15 @@ class AppEmptyView extends StatelessWidget {
final colors = Theme.of(context).colorScheme;
return Center(
child: Padding(
padding: const EdgeInsets.all(24),
padding: EdgeInsets.all(24.r),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(icon, size: 56, color: colors.outline),
const SizedBox(height: 12),
Icon(icon, size: 56.r, color: colors.outline),
SizedBox(height: 12.h),
Text(title, style: Theme.of(context).textTheme.titleMedium),
if (message != null) ...[
const SizedBox(height: 6),
SizedBox(height: 6.h),
Text(
message!,
textAlign: TextAlign.center,
@@ -36,7 +37,7 @@ class AppEmptyView extends StatelessWidget {
),
),
],
if (action != null) ...[const SizedBox(height: 16), action!],
if (action != null) ...[SizedBox(height: 16.h), action!],
],
),
),