31 lines
780 B
Dart
31 lines
780 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class AppLoadingView extends StatelessWidget {
|
|
const AppLoadingView({super.key, this.message = '加载中', this.size = 24});
|
|
|
|
final String message;
|
|
final double size;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Center(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
SizedBox.square(
|
|
dimension: size,
|
|
child: const CircularProgressIndicator(strokeWidth: 2.4),
|
|
),
|
|
const SizedBox(height: 12),
|
|
Text(
|
|
message,
|
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|