图片加载修复

hmxc
小赖 4 years ago
parent de52a4f5d0
commit 61e9dd5666

@ -41,7 +41,7 @@ class ActivityCard extends StatelessWidget {
firstPath == null
? SizedBox()
: Hero(
tag: API.image(firstPath),
tag: firstPath,
child: Material(
color: Colors.grey,
child: FadeInImage.assetNetwork(

@ -1,5 +1,6 @@
import 'dart:math';
import 'package:akuCommunity/model/common/img_model.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -65,9 +66,9 @@ class _ChatCardState extends State<ChatCard> {
borderRadius: BorderRadius.circular(8.w),
),
onPressed: () {
Get.to(
BeeImagePreview.path(path: widget.model.imgUrls.first.url),
opaque: false,
BeeImagePreview.toPath(
path: ImgModel.first(widget.model.imgUrls),
tag: ImgModel.first(widget.model.imgUrls),
);
},
child: ConstrainedBox(

@ -1,3 +1,4 @@
import 'package:akuCommunity/model/common/img_model.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@ -76,16 +77,13 @@ class MyEventCard extends StatelessWidget {
? SizedBox(height: 152.w)
: GestureDetector(
onTap: () {
Get.to(
BeeImagePreview.path(
path: model.imgUrl.first.url,
tag: API.image(model.imgUrl.first.url),
),
opaque: false,
BeeImagePreview.toPath(
path: ImgModel.first(model.imgUrl),
tag: ImgModel.first(model.imgUrl),
);
},
child: Hero(
tag: API.image(model.imgUrl.first.url),
tag: ImgModel.first(model.imgUrl),
child: Container(
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
@ -94,7 +92,7 @@ class MyEventCard extends StatelessWidget {
),
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(model.imgUrl.first.url),
image: API.image(ImgModel.first(model.imgUrl)),
width: 152.w,
height: 152.w,
fit: BoxFit.cover,

@ -1,3 +1,4 @@
import 'package:akuCommunity/model/common/img_model.dart';
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
@ -84,9 +85,9 @@ class NoticeCard extends StatelessWidget {
? SizedBox(height: 152.w)
: GestureDetector(
onTap: () {
Get.to(
BeeImagePreview.path(path: model.imgUrls.first.url),
opaque: false,
BeeImagePreview.toPath(
path: ImgModel.first(model.imgUrls),
tag: ImgModel.first(model.imgUrls),
);
},
child: Container(
@ -95,12 +96,15 @@ class NoticeCard extends StatelessWidget {
color: Colors.black12,
borderRadius: BorderRadius.circular(8.w),
),
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(model.imgUrls.first.url),
width: 152.w,
height: 152.w,
fit: BoxFit.cover,
child: Hero(
tag: ImgModel.first(model.imgUrls),
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: ImgModel.first(model.imgUrls),
width: 152.w,
height: 152.w,
fit: BoxFit.cover,
),
),
),
),

@ -92,15 +92,11 @@ class _NoticeDetailPageState extends State<NoticeDetailPage> {
.map(
(e) => GestureDetector(
onTap: () {
Get.to(
BeeImagePreview.path(path: e.url),
opaque: false,
);
BeeImagePreview.toPath(path: e.url, tag: e.url);
},
child: Hero(
tag: e.url,
child: Container(
height: 228.w,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w),

@ -32,7 +32,8 @@ class LoginUtil {
static bool get isNotLogin => !isLogin;
static bool haveRoom(String name) {
if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修'))) return true;
if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修|我的缴费')))
return true;
final appProvider = Provider.of<AppProvider>(Get.context, listen: false);
if (appProvider.selectedHouse == null) {
BotToast.showText(text: '请先添加房屋');

@ -29,10 +29,7 @@ class BeeGridImageView extends StatelessWidget {
itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
Get.to(
BeeImagePreview.path(path: urls[index]),
opaque: false,
);
BeeImagePreview.toPath(path: urls[index], tag: urls[index]);
},
child: Hero(
tag: urls[index],

Loading…
Cancel
Save