feat: Z有3笔头像更换为自定义图片(打包为应用资产,离线可用)

This commit is contained in:
ZV Team committed 2026-10-24 11:17:12 +08:00
1 parent 211680b9ae
commit 46889155e5
4 files changed
+55 -47

No files matched your search

+36 -36
View File
@@ -1,37 +1,37 @@
# This is a generated file; do not edit or check into version control. # This is a generated file; do not edit or check into version control.
file_picker=/root/.pub-cache/hosted/pub.flutter-io.cn/file_picker-8.3.7/ file_picker=/root/.pub-cache/hosted/pub.dev/file_picker-8.3.7/
file_selector_linux=/root/.pub-cache/hosted/pub.flutter-io.cn/file_selector_linux-0.9.3+2/ file_selector_linux=/root/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3+2/
file_selector_macos=/root/.pub-cache/hosted/pub.flutter-io.cn/file_selector_macos-0.9.4+2/ file_selector_macos=/root/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/
file_selector_windows=/root/.pub-cache/hosted/pub.flutter-io.cn/file_selector_windows-0.9.3+4/ file_selector_windows=/root/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+4/
flutter_plugin_android_lifecycle=/root/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-2.0.26/ flutter_plugin_android_lifecycle=/root/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.26/
flutter_secure_storage=/root/.pub-cache/hosted/pub.flutter-io.cn/flutter_secure_storage-9.2.4/ flutter_secure_storage=/root/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/
flutter_secure_storage_linux=/root/.pub-cache/hosted/pub.flutter-io.cn/flutter_secure_storage_linux-1.2.3/ flutter_secure_storage_linux=/root/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/
flutter_secure_storage_macos=/root/.pub-cache/hosted/pub.flutter-io.cn/flutter_secure_storage_macos-3.1.3/ flutter_secure_storage_macos=/root/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/
flutter_secure_storage_web=/root/.pub-cache/hosted/pub.flutter-io.cn/flutter_secure_storage_web-1.2.1/ flutter_secure_storage_web=/root/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/
flutter_secure_storage_windows=/root/.pub-cache/hosted/pub.flutter-io.cn/flutter_secure_storage_windows-3.1.2/ flutter_secure_storage_windows=/root/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/
image_picker=/root/.pub-cache/hosted/pub.flutter-io.cn/image_picker-1.1.2/ image_picker=/root/.pub-cache/hosted/pub.dev/image_picker-1.1.2/
image_picker_android=/root/.pub-cache/hosted/pub.flutter-io.cn/image_picker_android-0.8.12+21/ image_picker_android=/root/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+21/
image_picker_for_web=/root/.pub-cache/hosted/pub.flutter-io.cn/image_picker_for_web-3.0.6/ image_picker_for_web=/root/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/
image_picker_ios=/root/.pub-cache/hosted/pub.flutter-io.cn/image_picker_ios-0.8.12+2/ image_picker_ios=/root/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+2/
image_picker_linux=/root/.pub-cache/hosted/pub.flutter-io.cn/image_picker_linux-0.2.1+2/ image_picker_linux=/root/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+2/
image_picker_macos=/root/.pub-cache/hosted/pub.flutter-io.cn/image_picker_macos-0.2.1+2/ image_picker_macos=/root/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+2/
image_picker_windows=/root/.pub-cache/hosted/pub.flutter-io.cn/image_picker_windows-0.2.1+1/ image_picker_windows=/root/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/
package_info_plus=/root/.pub-cache/hosted/pub.flutter-io.cn/package_info_plus-8.3.1/ package_info_plus=/root/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/
path_provider=/root/.pub-cache/hosted/pub.flutter-io.cn/path_provider-2.1.5/ path_provider=/root/.pub-cache/hosted/pub.dev/path_provider-2.1.5/
path_provider_android=/root/.pub-cache/hosted/pub.flutter-io.cn/path_provider_android-2.2.15/ path_provider_android=/root/.pub-cache/hosted/pub.dev/path_provider_android-2.2.15/
path_provider_foundation=/root/.pub-cache/hosted/pub.flutter-io.cn/path_provider_foundation-2.4.1/ path_provider_foundation=/root/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/
path_provider_linux=/root/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-2.2.1/ path_provider_linux=/root/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
path_provider_windows=/root/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-2.3.0/ path_provider_windows=/root/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/
shared_preferences=/root/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-2.5.3/ shared_preferences=/root/.pub-cache/hosted/pub.dev/shared_preferences-2.5.3/
shared_preferences_android=/root/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_android-2.4.7/ shared_preferences_android=/root/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.7/
shared_preferences_foundation=/root/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_foundation-2.5.4/ shared_preferences_foundation=/root/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/
shared_preferences_linux=/root/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-2.4.1/ shared_preferences_linux=/root/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/
shared_preferences_web=/root/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-2.4.3/ shared_preferences_web=/root/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/
shared_preferences_windows=/root/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-2.4.1/ shared_preferences_windows=/root/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/
sqflite=/root/.pub-cache/hosted/pub.flutter-io.cn/sqflite-2.4.1/ sqflite=/root/.pub-cache/hosted/pub.dev/sqflite-2.4.1/
sqflite_android=/root/.pub-cache/hosted/pub.flutter-io.cn/sqflite_android-2.4.0/ sqflite_android=/root/.pub-cache/hosted/pub.dev/sqflite_android-2.4.0/
sqflite_darwin=/root/.pub-cache/hosted/pub.flutter-io.cn/sqflite_darwin-2.4.1+1/ sqflite_darwin=/root/.pub-cache/hosted/pub.dev/sqflite_darwin-2.4.1+1/
video_player=/root/.pub-cache/hosted/pub.flutter-io.cn/video_player-2.9.5/ video_player=/root/.pub-cache/hosted/pub.dev/video_player-2.9.5/
video_player_android=/root/.pub-cache/hosted/pub.flutter-io.cn/video_player_android-2.7.16/ video_player_android=/root/.pub-cache/hosted/pub.dev/video_player_android-2.7.16/
video_player_avfoundation=/root/.pub-cache/hosted/pub.flutter-io.cn/video_player_avfoundation-2.7.1/ video_player_avfoundation=/root/.pub-cache/hosted/pub.dev/video_player_avfoundation-2.7.1/
video_player_web=/root/.pub-cache/hosted/pub.flutter-io.cn/video_player_web-2.3.5/ video_player_web=/root/.pub-cache/hosted/pub.dev/video_player_web-2.3.5/
Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

+17 -11
View File
@@ -84,10 +84,10 @@ class _AboutPageState extends State<AboutPage> {
padding: const EdgeInsets.fromLTRB(16, 12, 16, 4), padding: const EdgeInsets.fromLTRB(16, 12, 16, 4),
child: T('创造者', style: Theme.of(context).textTheme.titleSmall), child: T('创造者', style: Theme.of(context).textTheme.titleSmall),
), ),
_CreatorTile( const _CreatorTile(
name: 'Z有3笔', name: 'Z有3笔',
role: S.t('开发者 · Gitee: DriftinBlock'), role: '开发者 · Gitee: DriftinBlock',
avatarUrl: 'https://gitee.com/driftinblock.png', assetAvatar: 'assets/creator_zavatar.png',
homeUrl: 'https://gitee.com/driftinblock', homeUrl: 'https://gitee.com/driftinblock',
), ),
_CreatorTile( _CreatorTile(
@@ -122,14 +122,18 @@ class _AboutPageState extends State<AboutPage> {
class _CreatorTile extends StatelessWidget { class _CreatorTile extends StatelessWidget {
final String name; final String name;
final String role; final String role;
final String avatarUrl;
final String homeUrl; final String homeUrl;
/// 头像二选一:本地资产优先,否则用网络头像。
final String? assetAvatar;
final String? avatarUrl;
const _CreatorTile({ const _CreatorTile({
required this.name, required this.name,
required this.role, required this.role,
required this.avatarUrl,
required this.homeUrl, required this.homeUrl,
this.assetAvatar,
this.avatarUrl,
}); });
@override @override
@@ -139,12 +143,14 @@ class _CreatorTile extends StatelessWidget {
child: SizedBox( child: SizedBox(
width: 44, width: 44,
height: 44, height: 44,
child: Image.network( child: assetAvatar != null
avatarUrl, ? Image.asset(assetAvatar!, fit: BoxFit.cover)
fit: BoxFit.cover, : Image.network(
errorBuilder: (_, __, ___) => avatarUrl!,
const ColoredBox(color: Color(0xFFDDDDDD), child: Icon(Icons.person)), fit: BoxFit.cover,
), errorBuilder: (_, __, ___) => const ColoredBox(
color: Color(0xFFDDDDDD), child: Icon(Icons.person)),
),
), ),
), ),
title: Text(name), title: Text(name),
+2
View File
@@ -32,3 +32,5 @@ dev_dependencies:
flutter_lints: ^5.0.0 flutter_lints: ^5.0.0
flutter: flutter:
uses-material-design: true uses-material-design: true
assets:
- assets/creator_zavatar.png