屏幕适配
This commit is contained in:
@@ -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!],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user