feat:更新图片url路径

This commit is contained in:
2025-11-19 10:40:02 +08:00
parent 7ede1c2d89
commit 625a872d2f
13 changed files with 150 additions and 150 deletions

View File

@@ -107,20 +107,23 @@ Widget buildFileImage(BuildContext context, File imageFile) {
}
Widget buildNetworkImage(BuildContext context, String url) {
return ClipRRect(
borderRadius: BorderRadius.circular(8),
child: GestureDetector(
onTap: () {
showFullScreenImage(context, NetworkImage(url));
},
child: Image.network(
url,
fit: BoxFit.cover,
loadingBuilder: (context, child, loadingProgress) {
if (loadingProgress == null) return child;
return buildImageLoadingIndicator(loadingProgress);
return AspectRatio(
aspectRatio: 1.5,
child: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: GestureDetector(
onTap: () {
showFullScreenImage(context, NetworkImage(url));
},
errorBuilder: (context, error, stackTrace) => _buildErrorImage(),
child: Image.network(
url,
fit: BoxFit.cover,
loadingBuilder: (context, child, loadingProgress) {
if (loadingProgress == null) return child;
return buildImageLoadingIndicator(loadingProgress);
},
errorBuilder: (context, error, stackTrace) => _buildErrorImage(),
),
),
),
);

View File

@@ -153,7 +153,7 @@ void showSuccessToast(String message) {
Fluttertoast.showToast(
msg: message,
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
gravity: ToastGravity.TOP,
timeInSecForIosWeb: 1,
backgroundColor: Colors.green,
textColor: Colors.white,
@@ -166,7 +166,7 @@ void showErrorToast(String message) {
Fluttertoast.showToast(
msg: message,
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
gravity: ToastGravity.TOP,
timeInSecForIosWeb: 1,
backgroundColor: Colors.red,
textColor: Colors.white,