mirror of
https://github.com/Livinglist/Hacki.git
synced 2025-08-26 11:17:22 +08:00
fixed image exception.
This commit is contained in:
@ -148,21 +148,21 @@ class _LinkPreviewState extends State<LinkPreview> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildPlaceHolder(Color color, double defaultHeight) {
|
// Widget _buildPlaceHolder(Color color, double defaultHeight) {
|
||||||
return SizedBox(
|
// return SizedBox(
|
||||||
height: defaultHeight,
|
// height: defaultHeight,
|
||||||
child: LayoutBuilder(builder: (context, constraints) {
|
// child: LayoutBuilder(builder: (context, constraints) {
|
||||||
final layoutWidth = constraints.biggest.width;
|
// final layoutWidth = constraints.biggest.width;
|
||||||
final layoutHeight = constraints.biggest.height;
|
// final layoutHeight = constraints.biggest.height;
|
||||||
|
//
|
||||||
return Container(
|
// return Container(
|
||||||
color: color,
|
// color: color,
|
||||||
width: layoutWidth,
|
// width: layoutWidth,
|
||||||
height: layoutHeight,
|
// height: layoutHeight,
|
||||||
);
|
// );
|
||||||
}),
|
// }),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
Widget _buildLinkContainer(
|
Widget _buildLinkContainer(
|
||||||
double _height, {
|
double _height, {
|
||||||
@ -228,8 +228,11 @@ class _LinkPreviewState extends State<LinkPreview> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
loadedWidget = _info == null
|
loadedWidget = _info == null
|
||||||
? widget.errorWidget ??
|
? _buildLinkContainer(
|
||||||
_buildPlaceHolder(widget.backgroundColor!, _height)
|
_height,
|
||||||
|
title: _errorTitle,
|
||||||
|
image: _errorImage,
|
||||||
|
)
|
||||||
: _buildLinkContainer(_height,
|
: _buildLinkContainer(_height,
|
||||||
title: _errorTitle,
|
title: _errorTitle,
|
||||||
desc: WebAnalyzer.isNotEmpty(info!.description)
|
desc: WebAnalyzer.isNotEmpty(info!.description)
|
||||||
|
Reference in New Issue
Block a user