git-subtree-dir: app git-subtree-mainline:6ebd902c6bgit-subtree-split:a11a668869
25 lines
558 B
Dart
25 lines
558 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// 加载骨架屏
|
|
class LoadingView extends StatelessWidget {
|
|
final String? text;
|
|
|
|
const LoadingView({super.key, this.text});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Center(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
const CircularProgressIndicator(),
|
|
if (text != null) ...[
|
|
const SizedBox(height: 12),
|
|
Text(text!, style: const TextStyle(color: Colors.grey)),
|
|
],
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|