|
@@ -38,6 +38,9 @@ class FConsultationContentImage extends StatelessWidget implements FWidget {
|
|
|
///图片文字描述
|
|
|
final String? description;
|
|
|
|
|
|
+ ///插件
|
|
|
+ final FWidget? plugin;
|
|
|
+
|
|
|
FConsultationContentImage({
|
|
|
Key? key,
|
|
|
this.isMeasure = false,
|
|
@@ -51,6 +54,7 @@ class FConsultationContentImage extends StatelessWidget implements FWidget {
|
|
|
this.contentWidth = 300,
|
|
|
this.consultationFileInfo,
|
|
|
this.fileDataType,
|
|
|
+ this.plugin,
|
|
|
}) : super(key: key);
|
|
|
|
|
|
@override
|
|
@@ -58,9 +62,9 @@ class FConsultationContentImage extends StatelessWidget implements FWidget {
|
|
|
if (fileDataType == null) {
|
|
|
fileDataType = consultationFileInfo?.fileDataType;
|
|
|
}
|
|
|
-
|
|
|
+ FWidget child;
|
|
|
if (isPureImage) {
|
|
|
- return FContainer(
|
|
|
+ child = FContainer(
|
|
|
color: Colors.black,
|
|
|
child: FImage.network(
|
|
|
consultationFileInfo?.previewImageUrl ?? "",
|
|
@@ -73,11 +77,22 @@ class FConsultationContentImage extends StatelessWidget implements FWidget {
|
|
|
}),
|
|
|
),
|
|
|
);
|
|
|
- } else
|
|
|
- return _buildFContentImage(
|
|
|
+ } else {
|
|
|
+ child = _buildFContentImage(
|
|
|
fileDataType!,
|
|
|
consultationFileInfo?.previewImageUrl ?? "",
|
|
|
);
|
|
|
+ }
|
|
|
+ return FStack(
|
|
|
+ children: [
|
|
|
+ FPositioned(child: child),
|
|
|
+ FPositioned(
|
|
|
+ right: 10,
|
|
|
+ top: 5,
|
|
|
+ child: plugin ?? FSizedBox(),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
FWidget _buildFContentImage(
|