马良AI写作初始化仓库

This commit is contained in:
邓滨杰
2025-09-10 00:07:52 +08:00
parent 3c06bb1a03
commit 39c0f8840f
1309 changed files with 318528 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
import 'package:flutter/material.dart';
import 'package:ainoval/utils/web_theme.dart';
/// 加载指示器组件
class LoadingIndicator extends StatelessWidget {
const LoadingIndicator({
Key? key,
this.message,
this.color,
}) : super(key: key);
final String? message;
final Color? color;
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(
color ?? WebTheme.getPrimaryColor(context),
),
),
if (message != null) ...[
const SizedBox(height: 16),
Text(
message!,
style: Theme.of(context).textTheme.bodyMedium,
textAlign: TextAlign.center,
),
],
],
);
}
}

View File

@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
/// 无数据占位符组件
class NoDataPlaceholder extends StatelessWidget {
const NoDataPlaceholder({
Key? key,
required this.message,
required this.icon,
this.color,
this.size = 64,
}) : super(key: key);
final String message;
final IconData icon;
final Color? color;
final double size;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Icon(
icon,
size: size,
color: color ?? theme.disabledColor.withOpacity(0.5),
),
const SizedBox(height: 16),
Text(
message,
style: theme.textTheme.bodyLarge?.copyWith(
color: theme.textTheme.bodyLarge?.color?.withOpacity(0.6),
),
textAlign: TextAlign.center,
),
],
),
);
}
}