174 lines
6.6 KiB
Dart
174 lines
6.6 KiB
Dart
import 'package:ef/ef.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
|
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
|
|
|
import 'package:vbvs_app/controller/mh_controller/mhdevice_share_controller.dart';
|
|
|
|
class ShareUserWidget extends GetView {
|
|
int index;
|
|
MHDeviceShareController repairListController;
|
|
|
|
ShareUserWidget({required this.index, required this.repairListController}) {}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var info = repairListController.model.shareUser![index];
|
|
return InkWell(
|
|
onTap: () {
|
|
repairListController.model.mainShare =
|
|
repairListController.model.shareUser![index];
|
|
Get.toNamed('/share_device_user_detail');
|
|
},
|
|
child: Container(
|
|
width: MediaQuery.sizeOf(context).width,
|
|
height: MediaQuery.sizeOf(context).height * 0.073,
|
|
constraints: const BoxConstraints(
|
|
minHeight: 71,
|
|
),
|
|
decoration: const BoxDecoration(
|
|
border: Border(
|
|
bottom: BorderSide(
|
|
color: Color(0xFF929699), // 设置底部线条颜色
|
|
width: 0, // 设置线条宽度
|
|
),
|
|
top: BorderSide(
|
|
color: Color(0xFF929699), // 设置底部线条颜色
|
|
width: 0, // 设置线条宽度
|
|
)),
|
|
),
|
|
child: Padding(
|
|
padding:
|
|
EdgeInsetsDirectional.fromSTEB(37.rpx, 29.rpx, 42.rpx, 30.rpx),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Container(
|
|
width: 42.rpx,
|
|
height: 42.rpx,
|
|
child: SvgPicture.asset('assets/img/icon/default_head.svg'),
|
|
),
|
|
|
|
Expanded(
|
|
child: Container(
|
|
margin:
|
|
EdgeInsetsDirectional.only(start: 30.rpx, end: 30.rpx),
|
|
// width: MediaQuery.sizeOf(context).width * 0.5,
|
|
// height: MediaQuery.sizeOf(context).height * 0.075,
|
|
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Expanded(
|
|
child: Align(
|
|
alignment: const AlignmentDirectional(-1, 0),
|
|
child: Text(
|
|
'${info['userName']}',
|
|
style: TextStyle(
|
|
fontFamily: 'Readex Pro',
|
|
color: Colors.white,
|
|
fontSize: 30.rpx,
|
|
letterSpacing: 0.0,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Align(
|
|
alignment: const AlignmentDirectional(-1, 0),
|
|
child: Text(
|
|
info['opType'] == 1
|
|
? '允许对方控制该设备'
|
|
: info['opType'] == 2
|
|
? '仅允许对方查看该设备'
|
|
: '',
|
|
style: TextStyle(
|
|
fontFamily: 'Readex Pro',
|
|
color: const Color(0xFFC8CBD2),
|
|
fontSize: 20.rpx,
|
|
letterSpacing: 0.0,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
].divide(const SizedBox(height: 5)),
|
|
),
|
|
),
|
|
),
|
|
// Container(
|
|
// width: MediaQuery.sizeOf(context).width * 0.2,
|
|
// height: MediaQuery.sizeOf(context).height * 0.075,
|
|
// constraints: const BoxConstraints(
|
|
// maxWidth: 130,
|
|
// ),
|
|
// decoration: BoxDecoration(
|
|
//
|
|
// ),
|
|
// child: Row(
|
|
// mainAxisSize: MainAxisSize.max,
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
// children: [
|
|
// Align(
|
|
// alignment: const AlignmentDirectional(0, 0),
|
|
// child: Text(
|
|
// ' ',
|
|
// style: TextStyle(
|
|
// fontFamily: 'Readex Pro',
|
|
// color: const Color(0xFF333333),
|
|
// fontSize: 13,
|
|
// letterSpacing: 0.0,
|
|
// ),
|
|
// ),
|
|
// ),
|
|
// Flexible(
|
|
// child: Align(
|
|
// alignment: const AlignmentDirectional(0, 0.05),
|
|
// child: Icon(
|
|
// Icons.arrow_forward_ios,
|
|
// color: FlutterFlowTheme.of(context).secondaryText,
|
|
// size: 10,
|
|
// ),
|
|
// ),
|
|
// ),
|
|
// ].divide(const SizedBox(width: 27)),
|
|
// ),
|
|
// ),
|
|
ClickableContainer(
|
|
backgroundColor: Colors.transparent,
|
|
highlightColor: Colors.transparent,
|
|
padding: EdgeInsets.only(right: 0),
|
|
onTap: () {},
|
|
child: Container(
|
|
height: 30.rpx,
|
|
width: 30.rpx,
|
|
child: SvgPicture.asset(
|
|
'assets/img/icon/expand.svg',
|
|
color: Colors.white,
|
|
)
|
|
// Icon(
|
|
// Icons.arrow_forward_ios,
|
|
// color: Colors.white,
|
|
// // size: 14.rpx,
|
|
// ),
|
|
)),
|
|
],
|
|
),
|
|
// Container(
|
|
// width: MediaQuery.sizeOf(context).width,
|
|
// height: MediaQuery.sizeOf(context).height * 0.09,
|
|
// child: Container(
|
|
// width: MediaQuery.sizeOf(context).width,
|
|
// height: MediaQuery.sizeOf(context).height * 0.09,
|
|
// decoration: BoxDecoration(),
|
|
|
|
// ),
|
|
// ),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|