|
@@ -94,6 +94,8 @@ class FContentImage extends StatelessWidget implements FWidget {
|
|
|
/// 图像定位描述描述
|
|
|
final String? locationDescription;
|
|
|
|
|
|
+ BoxFit? fit;
|
|
|
+
|
|
|
FContentImage({
|
|
|
Key? key,
|
|
|
this.terminalImage,
|
|
@@ -109,6 +111,7 @@ class FContentImage extends StatelessWidget implements FWidget {
|
|
|
this.locationDescription = '',
|
|
|
this.contentHeight = 200,
|
|
|
this.contentWidth = 300,
|
|
|
+ this.fit,
|
|
|
}) : super(key: key);
|
|
|
|
|
|
@override
|
|
@@ -128,8 +131,9 @@ class FContentImage extends StatelessWidget implements FWidget {
|
|
|
color: Colors.black,
|
|
|
child: FImage.network(
|
|
|
terminalImage!.coverImageUrl!,
|
|
|
- width: contentWidth,
|
|
|
- height: contentHeight,
|
|
|
+ width: fit == null ? contentWidth : null,
|
|
|
+ height: fit == null ? contentHeight : null,
|
|
|
+ fit: fit,
|
|
|
errorBuilder: ((context, error, stackTrace) {
|
|
|
return Container(
|
|
|
child: Text(i18nBook.common.error.t),
|