125 lines
3.9 KiB
Dart
125 lines
3.9 KiB
Dart
import 'dart:math';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:intl/intl.dart';
|
|
|
|
import '../../service/pile/device_type.dart';
|
|
import '../../service/pile/input.dart';
|
|
import '../../service/pile/public_widget.dart';
|
|
import '../aim_point/aimpoint_page.dart';
|
|
import 'controller.dart';
|
|
|
|
class RealDataContainer extends StatelessWidget {
|
|
final PlumRealDataController controller = Get.put(PlumRealDataController());
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// final size = MediaQuery.of(context).size;
|
|
return Container(
|
|
child: Stack(
|
|
children: [
|
|
RealDataVIew(),
|
|
Positioned(
|
|
bottom: 60, // 根据需要调整位置
|
|
left: 5, // 根据需要调整位置
|
|
child: Container(
|
|
decoration: const BoxDecoration(color: Colors.transparent),
|
|
child: Stack(children: [
|
|
Card(
|
|
color: Colors.transparent,
|
|
elevation: 0,
|
|
child: AimPointer(size: Size(250,250)),
|
|
),
|
|
]))),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class RealDataVIew extends GetView<RealDataController> {
|
|
RealDataVIew({super.key});
|
|
final PlumRealDataController plumDataController =
|
|
Get.find<PlumRealDataController>();
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
double fontSize = 16;
|
|
DeviceType deviceType = getDeviceType(context);
|
|
if (deviceType == DeviceType.mobile) {
|
|
fontSize = 16;
|
|
} else {
|
|
fontSize = 20;
|
|
}
|
|
return Container(
|
|
clipBehavior: Clip.hardEdge,
|
|
alignment: Alignment.centerLeft,
|
|
// height: 130,
|
|
padding: const EdgeInsets.symmetric(horizontal: 5),
|
|
decoration:
|
|
BoxDecoration(border: Border.all(color: Colors.black, width: 1)),
|
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
// Stack(children: [
|
|
// Positioned(
|
|
// width: 20,
|
|
// height: 20,
|
|
// child: Card(
|
|
// color: Colors.transparent,
|
|
// elevation: 5.0,
|
|
// child:
|
|
|
|
// ),
|
|
// )
|
|
// ]),
|
|
const SizedBox(
|
|
height: 20,
|
|
),
|
|
Wrap(
|
|
children: [
|
|
Obx(() => Text(
|
|
DateFormat('yy-MM-dd HH:mm:ss').format(controller.time.value),
|
|
style: const TextStyle(fontSize: 20, height: 2),
|
|
)),
|
|
],
|
|
),
|
|
SingleChildScrollView(
|
|
child: Theme(
|
|
data: ThemeData(
|
|
textTheme: TextTheme(
|
|
titleLarge: TextStyle(
|
|
fontSize: fontSize,
|
|
fontWeight: FontWeight.normal,
|
|
),
|
|
)),
|
|
child: Obx(() => Wrap(
|
|
children: [
|
|
// Text(
|
|
// '工作区域:$txt ',
|
|
// style: textStyle,
|
|
// ),
|
|
// Text(
|
|
// '工作层级:$txt ',
|
|
// style: textStyle,
|
|
// ),
|
|
Text(
|
|
'设备编号:${controller.tid.value} ',
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
Text(
|
|
'桩点名称:${controller.name.value} ',
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
Text(
|
|
'夯沉量:${controller.sid.value} ',
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
Text(
|
|
'次:${controller.times.value} ',
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
],
|
|
))),
|
|
),
|
|
]),
|
|
);
|
|
}
|
|
}
|