- 引入 DarkMode 工具类,提供系统栏、颜色、色调的暗色适配能力 - AppColors 调色板改为 CupertinoDynamicColor.withBrightness 自适应 - app.dart 增加 AnnotatedRegion 与 Material Theme 包裹以联动暗色系统栏 - 移除 system_ui_util 中硬编码的浅色图标配置,改由主题驱动 - CardBox、AppDivider、SectionTitle 等公共组件适配深色卡片与分割线 - settings_ui、change_mobile、change_password、login_devices、wechat_binding 等页面全面接入 DarkMode 颜色 - dio_client 新增 allowStale 响应缓存机制,网络异常时回退本地缓存 - token_storage 增加 currentAccountId(JWT 解析)及按用户隔离的设备偏好存取 - ApiException 改为通过私有构造持有真实 AppError 实例,appError getter 返回结构化错误 - 闹钟模块迁移至 FutureProvider.autoDispose.family,消除手动 loading 状态管理 - 闹钟编辑页 CupertinoTimerPicker 替换为 CupertinoDatePicker(24h 格式),标签输入改为 TextEditingController
622 lines
21 KiB
Dart
622 lines
21 KiB
Dart
import 'dart:io';
|
||
|
||
import 'package:cupertino_ui/cupertino_ui.dart';
|
||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||
import 'package:go_router/go_router.dart';
|
||
import 'package:image_picker/image_picker.dart';
|
||
import 'package:material_ui/material_ui.dart';
|
||
import 'package:path_provider/path_provider.dart';
|
||
import 'package:ttstd_family_care/app/theme/dark_mode.dart';
|
||
import 'package:ttstd_family_care/core/widgets/app_page_scaffold.dart';
|
||
|
||
import '../../../app/constants/app_constants.dart';
|
||
import '../../../core/network/dio_client.dart';
|
||
import '../../../core/widgets/feature_ui.dart';
|
||
import '../../../core/widgets/settings_ui.dart';
|
||
import '../../../features/device/data/device_providers.dart';
|
||
import '../../../features/device/presentation/device_switcher.dart';
|
||
import '../../../l10n/app_localizations.dart';
|
||
|
||
/// 壁纸设置页(首页 → 常用功能 → 壁纸设置)。
|
||
///
|
||
/// 分段切换「单个 / 轮换」两种壁纸模式:
|
||
/// - 单个:展示一张壁纸图,底部「更换」按钮从系统相册选择图片,
|
||
/// 选择后立即上传到后端并推送设备(mode=0);
|
||
/// - 轮换:壁纸图列表(最多 7 张),「新增」每次从相册添加一张,
|
||
/// 增删后整组上传到后端并推送设备(mode=1),图片右上角可单独移除,
|
||
/// **长按拖动可调整展示顺序**(调用后端排序接口)。
|
||
///
|
||
/// 选中的图片会复制到应用文档目录用于本次会话内稳定展示,
|
||
/// 最终生效以服务端保存并推送至设备为准。
|
||
class WallpaperPage extends ConsumerStatefulWidget {
|
||
const WallpaperPage({super.key});
|
||
|
||
@override
|
||
ConsumerState<WallpaperPage> createState() => _WallpaperPageState();
|
||
}
|
||
|
||
class _WallpaperPageState extends ConsumerState<WallpaperPage> {
|
||
/// 轮换壁纸数量上限。
|
||
static const int _maxRotation = 7;
|
||
|
||
final ImagePicker _picker = ImagePicker();
|
||
|
||
int _segment = 0;
|
||
String? _singleImage;
|
||
List<_RotationItem> _rotationItems = const [];
|
||
bool _uploading = false;
|
||
bool _loading = true;
|
||
|
||
AppLocalizations get _l10n => AppLocalizations.of(context);
|
||
|
||
@override
|
||
void initState() {
|
||
super.initState();
|
||
_loadWallpaper();
|
||
}
|
||
|
||
/// 壁纸文件本地目录。
|
||
Future<Directory> _wallpaperDir() async {
|
||
final dir = await getApplicationDocumentsDirectory();
|
||
return Directory('${dir.path}/wallpapers');
|
||
}
|
||
|
||
/// 将相册选中的图片复制到应用文档目录,返回持久路径
|
||
/// (系统相册返回的是临时缓存路径,直接展示可能被系统清理)。
|
||
Future<String> _copyToApp(XFile file) async {
|
||
final folder = await _wallpaperDir();
|
||
await folder.create(recursive: true);
|
||
final ext =
|
||
file.name.contains('.') ? file.name.split('.').last.toLowerCase() : 'jpg';
|
||
final dest =
|
||
'${folder.path}/wp_${DateTime.now().millisecondsSinceEpoch}.$ext';
|
||
await File(file.path).copy(dest);
|
||
return dest;
|
||
}
|
||
|
||
/// 下载壁纸图片到本地目录,返回本地路径;失败返回 null。
|
||
Future<String?> _downloadToLocal(String url) async {
|
||
try {
|
||
final folder = await _wallpaperDir();
|
||
await folder.create(recursive: true);
|
||
final name = url.split('/').last;
|
||
final dest = '${folder.path}/$name';
|
||
// 后端返回相对路径(如 /static/wallpaper/xxx),显式拼接服务端源地址,
|
||
// 避免依赖 dio 对相对路径的解析行为。
|
||
final fullUrl = url.startsWith('http://') || url.startsWith('https://')
|
||
? url
|
||
: '${Uri.parse(AppConstants.kBaseUrl).origin}$url';
|
||
await DioClient.downloadToFile(fullUrl, dest);
|
||
return dest;
|
||
} catch (e) {
|
||
debugPrint('wallpaper download failed: $url $e');
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/// 清空本地壁纸目录(重新拉取最新配置前调用)。
|
||
Future<void> _clearLocalWallpapers() async {
|
||
final folder = await _wallpaperDir();
|
||
if (await folder.exists()) {
|
||
await folder.delete(recursive: true);
|
||
}
|
||
}
|
||
|
||
/// 拉取后端最新的壁纸配置并下载图片到本地展示。
|
||
///
|
||
/// 页面进入与切换 Tab 时调用,保证展示的是最新数据。
|
||
Future<void> _loadWallpaper() async {
|
||
final sn = _sn;
|
||
if (sn == null || sn.isEmpty) {
|
||
if (mounted) setState(() => _loading = false);
|
||
return;
|
||
}
|
||
try {
|
||
final config =
|
||
await ref.read(deviceRepositoryProvider).getWallpaperConfig(sn);
|
||
if (!mounted) return;
|
||
setState(() => _loading = true);
|
||
await _clearLocalWallpapers();
|
||
if (config == null || config.images.isEmpty) {
|
||
if (!mounted) return;
|
||
setState(() {
|
||
_singleImage = null;
|
||
_rotationItems = const [];
|
||
_loading = false;
|
||
});
|
||
return;
|
||
}
|
||
final paths = await Future.wait(config.images.map(_downloadToLocal));
|
||
final items = <_RotationItem>[];
|
||
for (var i = 0; i < config.images.length; i++) {
|
||
final p = paths[i];
|
||
if (p != null) {
|
||
items.add(_RotationItem(localPath: p, url: config.images[i]));
|
||
}
|
||
}
|
||
if (!mounted) return;
|
||
setState(() {
|
||
if (config.mode == 1) {
|
||
_singleImage = null;
|
||
_rotationItems = items;
|
||
} else {
|
||
_singleImage = items.isEmpty ? null : items.first.localPath;
|
||
_rotationItems = const [];
|
||
}
|
||
_loading = false;
|
||
});
|
||
} catch (e) {
|
||
debugPrint('load wallpaper failed: $e');
|
||
if (mounted) setState(() => _loading = false);
|
||
}
|
||
}
|
||
|
||
/// 当前选中的绑定设备 SN;未绑定返回 null。
|
||
String? get _sn => ref.read(selectedDeviceSnProvider);
|
||
|
||
/// 未绑定设备提示。
|
||
void _showNoDevice() {
|
||
AppDialogs.alert(
|
||
context,
|
||
message: _l10n.contactNoDevice,
|
||
confirmText: _l10n.commonConfirm,
|
||
);
|
||
}
|
||
|
||
/// 切换 Tab 并重新拉取最新壁纸数据。
|
||
void _onSegmentTap(int index) {
|
||
if (index == _segment) return;
|
||
setState(() => _segment = index);
|
||
_loadWallpaper();
|
||
}
|
||
|
||
/// 单个模式:更换壁纸 → 立即上传到后端并推送设备。
|
||
Future<void> _changeSingle() async {
|
||
final sn = _sn;
|
||
if (sn == null || sn.isEmpty) {
|
||
_showNoDevice();
|
||
return;
|
||
}
|
||
final picked = await _picker.pickImage(source: ImageSource.gallery);
|
||
if (picked == null || !mounted) return;
|
||
final path = await _copyToApp(picked);
|
||
setState(() {
|
||
_singleImage = path;
|
||
_uploading = true;
|
||
});
|
||
final result = await ref
|
||
.read(deviceRepositoryProvider)
|
||
.uploadWallpaperSingle(sn, File(path));
|
||
if (!mounted) return;
|
||
setState(() => _uploading = false);
|
||
if (result.error != null) {
|
||
AppDialogs.alert(context, message: result.error!, confirmText: _l10n.commonConfirm);
|
||
}
|
||
}
|
||
|
||
/// 轮换模式:新增一张 → 整组上传到后端并推送设备。
|
||
Future<void> _addRotation() async {
|
||
final sn = _sn;
|
||
if (sn == null || sn.isEmpty) {
|
||
_showNoDevice();
|
||
return;
|
||
}
|
||
if (_rotationItems.length >= _maxRotation) {
|
||
AppDialogs.alert(
|
||
context,
|
||
message: _l10n.wallpaperMaxLimit,
|
||
confirmText: _l10n.commonConfirm,
|
||
);
|
||
return;
|
||
}
|
||
final picked = await _picker.pickImage(source: ImageSource.gallery);
|
||
if (picked == null || !mounted) return;
|
||
final path = await _copyToApp(picked);
|
||
setState(() => _rotationItems = [..._rotationItems, _RotationItem(localPath: path)]);
|
||
await _uploadRotation(sn);
|
||
}
|
||
|
||
/// 移除某张轮换壁纸 → 整组重新上传。
|
||
Future<void> _removeRotation(int index) async {
|
||
final sn = _sn;
|
||
setState(() {
|
||
_rotationItems = [
|
||
for (var i = 0; i < _rotationItems.length; i++)
|
||
if (i != index) _rotationItems[i],
|
||
];
|
||
});
|
||
if (sn == null || sn.isEmpty) return;
|
||
if (_rotationItems.isEmpty) return;
|
||
await _uploadRotation(sn);
|
||
}
|
||
|
||
/// 将当前轮换列表整组上传到后端并推送设备,成功后回填各图 URL。
|
||
Future<void> _uploadRotation(String sn) async {
|
||
if (_uploading) return;
|
||
setState(() => _uploading = true);
|
||
final files = [for (final item in _rotationItems) File(item.localPath)];
|
||
final result = await ref
|
||
.read(deviceRepositoryProvider)
|
||
.uploadWallpaperRotation(sn, files);
|
||
if (!mounted) return;
|
||
setState(() => _uploading = false);
|
||
if (result.error != null) {
|
||
AppDialogs.alert(context, message: result.error!, confirmText: _l10n.commonConfirm);
|
||
return;
|
||
}
|
||
final urls = result.urls;
|
||
if (urls != null && urls.length == _rotationItems.length) {
|
||
setState(() {
|
||
_rotationItems = [
|
||
for (var i = 0; i < _rotationItems.length; i++)
|
||
_RotationItem(localPath: _rotationItems[i].localPath, url: urls[i]),
|
||
];
|
||
});
|
||
}
|
||
}
|
||
|
||
/// 长按拖动排序回调:重排本地列表后持久化到后端。
|
||
void _onReorder(int oldIndex, int newIndex) {
|
||
final count = _rotationItems.length;
|
||
if (newIndex > oldIndex) newIndex--;
|
||
if (newIndex >= count) newIndex = count - 1;
|
||
if (newIndex < 0) newIndex = 0;
|
||
if (newIndex == oldIndex) return;
|
||
setState(() {
|
||
final item = _rotationItems.removeAt(oldIndex);
|
||
_rotationItems.insert(newIndex, item);
|
||
});
|
||
_persistOrder();
|
||
}
|
||
|
||
/// 将重排后的顺序同步到后端(sort_no)。
|
||
Future<void> _persistOrder() async {
|
||
final sn = _sn;
|
||
if (sn == null || sn.isEmpty) return;
|
||
final urls = [for (final item in _rotationItems) item.url];
|
||
// 存在尚未回传 URL 的项(如刚新增尚未上传完成),退回整组重传以保序。
|
||
if (urls.any((u) => u.isEmpty)) {
|
||
await _uploadRotation(sn);
|
||
return;
|
||
}
|
||
final err = await ref
|
||
.read(deviceRepositoryProvider)
|
||
.reorderWallpaper(sn, urls);
|
||
if (!mounted || err == null) return;
|
||
AppDialogs.alert(context, message: err, confirmText: _l10n.commonConfirm);
|
||
}
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return PopScope(
|
||
canPop: false,
|
||
onPopInvokedWithResult: (didPop, _) {
|
||
if (didPop) return;
|
||
if (context.canPop()) {
|
||
context.pop();
|
||
} else {
|
||
context.go('/home');
|
||
}
|
||
},
|
||
child: AppPageScaffold(
|
||
navigationBar: CupertinoNavigationBar(
|
||
middle: DeviceContextTitle(_l10n.wallpaperTitle),
|
||
leading: CupertinoButton(
|
||
padding: EdgeInsets.zero,
|
||
child: const Icon(CupertinoIcons.back),
|
||
onPressed: () => context.pop(),
|
||
),
|
||
),
|
||
child: SafeArea(
|
||
top: false,
|
||
child: _loading
|
||
? const Center(child: CupertinoActivityIndicator())
|
||
: Column(
|
||
children: [
|
||
_buildSegment(),
|
||
Expanded(
|
||
child: _segment == 0 ? _buildSingle() : _buildRotation(),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
|
||
/// 分段切换:单个 / 轮换。
|
||
Widget _buildSegment() {
|
||
final segments = [_l10n.wallpaperSingle, _l10n.wallpaperRotate];
|
||
return Padding(
|
||
padding: const EdgeInsets.fromLTRB(16, 10, 16, 4),
|
||
child: Container(
|
||
padding: const EdgeInsets.all(3),
|
||
decoration: BoxDecoration(
|
||
color: DarkMode.color(context, AppColors.track),
|
||
borderRadius: BorderRadius.circular(12),
|
||
),
|
||
child: Row(
|
||
children: [
|
||
for (var i = 0; i < segments.length; i++)
|
||
Expanded(
|
||
child: GestureDetector(
|
||
onTap: () => _onSegmentTap(i),
|
||
child: Container(
|
||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||
decoration: BoxDecoration(
|
||
color: _segment == i
|
||
? CupertinoColors.white
|
||
: const Color(0x00000000),
|
||
borderRadius: BorderRadius.circular(9),
|
||
boxShadow: _segment == i
|
||
? const [
|
||
BoxShadow(
|
||
color: Color(0x14141E3C),
|
||
blurRadius: 6,
|
||
offset: Offset(0, 2),
|
||
),
|
||
]
|
||
: null,
|
||
),
|
||
child: Center(
|
||
child: Text(
|
||
segments[i],
|
||
style: TextStyle(
|
||
fontSize: 13,
|
||
fontWeight: FontWeight.w600,
|
||
color:
|
||
_segment == i ? DarkMode.color(context, AppColors.ink) : DarkMode.color(context, AppColors.sub),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}
|
||
|
||
/// 单个模式:一张壁纸图 + 底部「更换」按钮。
|
||
Widget _buildSingle() {
|
||
return ListView(
|
||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 24),
|
||
children: [
|
||
CardBox(
|
||
padding: const EdgeInsets.all(12),
|
||
child: AspectRatio(
|
||
aspectRatio: 3 / 4,
|
||
child: ClipRRect(
|
||
borderRadius: BorderRadius.circular(12),
|
||
child: _WallpaperImage(
|
||
path: _singleImage,
|
||
emptyHint: _l10n.wallpaperEmptySingle,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
const SizedBox(height: 16),
|
||
PrimaryButton(
|
||
text: _l10n.wallpaperChange,
|
||
loading: _uploading,
|
||
onPressed: _uploading ? null : _changeSingle,
|
||
),
|
||
],
|
||
);
|
||
}
|
||
|
||
/// 轮换模式:图片列表(最多 7 张),支持长按拖动排序,末尾为「新增」入口。
|
||
Widget _buildRotation() {
|
||
return Column(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
Padding(
|
||
padding: const EdgeInsets.fromLTRB(18, 10, 18, 6),
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
Text(
|
||
'${_l10n.wallpaperMaxLimit} · ${_l10n.wallpaperAdd}'
|
||
'(${_rotationItems.length}/$_maxRotation)',
|
||
style: TextStyle(fontSize: 12, color: DarkMode.color(context, AppColors.sub)),
|
||
),
|
||
if (_rotationItems.isNotEmpty) ...[
|
||
const SizedBox(height: 2),
|
||
Text(
|
||
_l10n.wallpaperDragTip,
|
||
style: TextStyle(fontSize: 11, color: DarkMode.color(context, AppColors.sub)),
|
||
),
|
||
],
|
||
],
|
||
),
|
||
),
|
||
Expanded(
|
||
child: _rotationItems.isEmpty
|
||
? _buildRotationEmpty()
|
||
: ReorderableListView.builder(
|
||
padding: const EdgeInsets.fromLTRB(16, 4, 16, 24),
|
||
buildDefaultDragHandles: false,
|
||
// 默认 proxyDecorator 用不透明 Material 包裹拖拽项,
|
||
// 会把 item 底部内边距渲染成白色条(留白),且圆角处不透明白色。
|
||
// 改用透明 Material,仅保留阴影,圆角处透出页面背景。
|
||
proxyDecorator: (child, index, animation) => Material(
|
||
type: MaterialType.canvas,
|
||
color: Colors.transparent,
|
||
elevation: 4,
|
||
shadowColor: Colors.black26,
|
||
borderRadius: BorderRadius.circular(14),
|
||
child: child,
|
||
),
|
||
itemCount:
|
||
_rotationItems.length +
|
||
(_rotationItems.length < _maxRotation ? 1 : 0),
|
||
onReorder: _onReorder,
|
||
itemBuilder: (context, index) {
|
||
// 末尾「新增」占位项:不参与拖动。
|
||
if (index >= _rotationItems.length) {
|
||
return Padding(
|
||
key: const ValueKey('wallpaper_add_tile'),
|
||
padding: const EdgeInsets.only(top: 12),
|
||
child: _buildAddTile(),
|
||
);
|
||
}
|
||
return ReorderableDelayedDragStartListener(
|
||
key: ValueKey('wallpaper_item_$index'),
|
||
index: index,
|
||
child: Padding(
|
||
padding: const EdgeInsets.only(bottom: 12),
|
||
child: _buildImageTile(index),
|
||
),
|
||
);
|
||
},
|
||
),
|
||
),
|
||
],
|
||
);
|
||
}
|
||
|
||
/// 轮换列表为空时的引导:居中提示 + 「新增」入口。
|
||
Widget _buildRotationEmpty() {
|
||
return Center(
|
||
child: Column(
|
||
mainAxisSize: MainAxisSize.min,
|
||
children: [
|
||
Icon(CupertinoIcons.photo, size: 48, color: DarkMode.color(context, AppColors.sub)),
|
||
const SizedBox(height: 12),
|
||
Text(
|
||
_l10n.wallpaperEmpty,
|
||
style: TextStyle(fontSize: 13, color: DarkMode.color(context, AppColors.sub)),
|
||
),
|
||
const SizedBox(height: 20),
|
||
GestureDetector(
|
||
onTap: _addRotation,
|
||
child: Container(
|
||
padding:
|
||
const EdgeInsets.symmetric(horizontal: 28, vertical: 10),
|
||
decoration: BoxDecoration(
|
||
color: AppColors.green,
|
||
borderRadius: BorderRadius.circular(22),
|
||
),
|
||
child: Text(
|
||
_l10n.wallpaperAdd,
|
||
style: const TextStyle(
|
||
fontSize: 14,
|
||
fontWeight: FontWeight.w700,
|
||
color: CupertinoColors.white,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
);
|
||
}
|
||
|
||
/// 「新增」占位项:点击从相册添加一张壁纸。
|
||
Widget _buildAddTile() {
|
||
return GestureDetector(
|
||
onTap: _addRotation,
|
||
child: Container(
|
||
height: 64,
|
||
decoration: BoxDecoration(
|
||
color: DarkMode.color(context, AppColors.track),
|
||
borderRadius: BorderRadius.circular(14),
|
||
border: Border.all(color: const Color(0xFFDCE1EA), width: 1),
|
||
),
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
children: [
|
||
const Text('+',
|
||
style: TextStyle(
|
||
fontSize: 22, height: 1, color: AppColors.green)),
|
||
const SizedBox(width: 8),
|
||
Text(
|
||
_l10n.wallpaperAdd,
|
||
style: TextStyle(fontSize: 14, color: DarkMode.color(context, AppColors.sub)),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}
|
||
|
||
/// 单张轮换壁纸(竖向整行):图片 + 右上角移除按钮。
|
||
Widget _buildImageTile(int index) {
|
||
return Stack(
|
||
children: [
|
||
ClipRRect(
|
||
borderRadius: BorderRadius.circular(14),
|
||
child: AspectRatio(
|
||
aspectRatio: 16 / 9,
|
||
child: _WallpaperImage(path: _rotationItems[index].localPath),
|
||
),
|
||
),
|
||
Positioned(
|
||
top: 6,
|
||
right: 6,
|
||
child: GestureDetector(
|
||
onTap: () => _removeRotation(index),
|
||
child: Container(
|
||
width: 24,
|
||
height: 24,
|
||
decoration: const BoxDecoration(
|
||
color: Color(0x99000000),
|
||
shape: BoxShape.circle,
|
||
),
|
||
child: const Center(
|
||
child: Icon(CupertinoIcons.xmark,
|
||
size: 14, color: CupertinoColors.white),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
],
|
||
);
|
||
}
|
||
}
|
||
|
||
/// 单张轮换壁纸项:本地展示路径 + 服务端图片 URL。
|
||
class _RotationItem {
|
||
const _RotationItem({required this.localPath, this.url = ''});
|
||
|
||
final String localPath;
|
||
final String url;
|
||
}
|
||
|
||
/// 本地壁纸图展示;路径为空或文件不存在时展示占位图。
|
||
class _WallpaperImage extends StatelessWidget {
|
||
const _WallpaperImage({required this.path, this.emptyHint});
|
||
|
||
final String? path;
|
||
final String? emptyHint;
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
final p = path;
|
||
if (p == null || p.isEmpty || !File(p).existsSync()) {
|
||
return Container(
|
||
color: DarkMode.tone(context, const Color(0xFFEEF2F7), const Color(0xFF343C49)),
|
||
child: Column(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
children: [
|
||
Icon(CupertinoIcons.photo, size: 34, color: DarkMode.color(context, AppColors.sub)),
|
||
if (emptyHint != null) ...[
|
||
const SizedBox(height: 8),
|
||
Padding(
|
||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||
child: Text(
|
||
emptyHint!,
|
||
textAlign: TextAlign.center,
|
||
style: TextStyle(fontSize: 12, color: DarkMode.color(context, AppColors.sub)),
|
||
),
|
||
),
|
||
],
|
||
],
|
||
),
|
||
);
|
||
}
|
||
return Image.file(File(p), fit: BoxFit.cover);
|
||
}
|
||
}
|