import 'package:ducafe_ui_core/ducafe_ui_core.dart'; import 'package:flutter/material.dart'; import 'package:forui/forui.dart'; Widget appEmpty( BuildContext context, { bool loading = false, String loadingText = "正在识别中", SvgAsset? emptyIcon, String emptyText = "请让用户放置饭卡", }) { final theme = FTheme.of(context); emptyIcon ??= FAssets.icons.idCard; if (loading) { return [ CircularProgressIndicator( color: theme.colorScheme.primary, ).width(100.w).height(100.w).center(), SizedBox(height: 10.h), Text( loadingText, style: theme.typography.base.copyWith( color: theme.colorScheme.primary, ), ), ].toColumn(mainAxisAlignment: MainAxisAlignment.center); } return [ FIcon( emptyIcon, size: theme.typography.xl4.fontSize, ), SizedBox(height: 10.h), Text( emptyText, style: theme.typography.base.copyWith( color: theme.colorScheme.primary, ), ), ].toColumn(mainAxisAlignment: MainAxisAlignment.center); }