屏幕适配

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,22 +1,24 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class AppLoadingView extends StatelessWidget {
const AppLoadingView({super.key, this.message = '加载中', this.size = 24});
const AppLoadingView({super.key, this.message = '加载中', this.size});
final String message;
final double size;
final double? size;
@override
Widget build(BuildContext context) {
final effectiveSize = size ?? 24.r;
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox.square(
dimension: size,
child: const CircularProgressIndicator(strokeWidth: 2.4),
dimension: effectiveSize,
child: CircularProgressIndicator(strokeWidth: 2.4.r),
),
const SizedBox(height: 12),
SizedBox(height: 12.h),
Text(
message,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(