多语言后端数据
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import '../../common/color/appFontsize.dart';
|
||||
import '../../controller/mh_controller/apply_repair_controller.dart';
|
||||
|
||||
@@ -21,31 +22,20 @@ class ImgPreviewWidget extends GetView {
|
||||
width: MediaQuery.sizeOf(context).width * 0.25,
|
||||
height: MediaQuery.sizeOf(context).height * 0.15,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 140,
|
||||
),
|
||||
// minHeight: 140,
|
||||
),
|
||||
decoration: BoxDecoration(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width,
|
||||
height: MediaQuery.sizeOf(context).height * 0.116,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: Image.network(
|
||||
imgUrl,
|
||||
|
||||
// applyRepairController.getPublicUrl(imgUrl),
|
||||
width: 300,
|
||||
height: 200,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1, // 保证宽高比1:1
|
||||
child: Image.network(
|
||||
imgUrl,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -76,3 +66,55 @@ class ImgPreviewWidget extends GetView {
|
||||
);
|
||||
}
|
||||
}
|
||||
// class ImgPreviewWidget extends GetView {
|
||||
// final String imgUrl;
|
||||
// final int index;
|
||||
// final ApplyRepairController applyRepairController;
|
||||
// final bool isDel;
|
||||
|
||||
// ImgPreviewWidget({
|
||||
// required this.imgUrl,
|
||||
// required this.index,
|
||||
// required this.applyRepairController,
|
||||
// required this.isDel,
|
||||
// });
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Column(
|
||||
// mainAxisSize: MainAxisSize.min, // 不撑满 ListView 高度
|
||||
// children: [
|
||||
// // 正方形图片容器
|
||||
// AspectRatio(
|
||||
// aspectRatio: 1,
|
||||
// child: ClipRRect(
|
||||
// borderRadius: BorderRadius.circular(8),
|
||||
// child: Image.network(
|
||||
// imgUrl,
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// // 删除按钮
|
||||
// if (isDel)
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(top: 6),
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// applyRepairController.model.issue_img!.removeAt(index);
|
||||
// applyRepairController.updateAll();
|
||||
// },
|
||||
// child: Text(
|
||||
// '删除',
|
||||
// style: TextStyle(
|
||||
// fontFamily: 'Readex Pro',
|
||||
// color: Color(0xFF9EA4B7),
|
||||
// fontSize: AppFontsize.small_text_size,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user