CFG重新修改
This commit is contained in:
parent
58ec37a7c5
commit
8863427829
@ -69,7 +69,7 @@ class RealDataController extends GetxController {
|
||||
final name = '桩点名称'.obs;
|
||||
final sid = '10.222'.obs;
|
||||
final times = 10.obs;
|
||||
late final isClick = false.obs;
|
||||
final isClicked = false.obs;
|
||||
|
||||
late final lineDis = 110.0.obs;
|
||||
late final distance = 460.0.obs;
|
||||
|
@ -10,8 +10,7 @@ import '../aim_point/aimpoint_page.dart';
|
||||
import 'controller.dart';
|
||||
|
||||
class RealDataContainer extends StatelessWidget {
|
||||
final PlumRealDataController controller = Get.put(PlumRealDataController());
|
||||
final RealDataController realdatacontroller = Get.put(RealDataController());
|
||||
final RealDataController controller = Get.find<RealDataController>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -36,25 +35,27 @@ class RealDataContainer extends StatelessWidget {
|
||||
Positioned(
|
||||
bottom: 30,
|
||||
left: 35,
|
||||
child: ElevatedButton(
|
||||
child: Obx(() => ElevatedButton(
|
||||
style: ButtonStyle(
|
||||
fixedSize: MaterialStateProperty.all(Size(200, 70)),
|
||||
backgroundColor: MaterialStateProperty.all(
|
||||
const Color.fromARGB(255, 226, 220, 220))),
|
||||
const Color.fromARGB(255, 226, 220, 220),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
realdatacontroller.isClick.value ? ' 暂停 ' : ' 开始 ',
|
||||
controller.isClicked.value ? ' 暂停 ' : ' 开始 ',
|
||||
style: TextStyle(
|
||||
fontSize: 28,
|
||||
color: realdatacontroller.isClick.value
|
||||
color: controller.isClicked.value
|
||||
? Colors.red
|
||||
: Colors.green),
|
||||
: Colors.green,
|
||||
),
|
||||
onPressed: () => {
|
||||
realdatacontroller.isClick.value =
|
||||
!realdatacontroller.isClick.value,
|
||||
),
|
||||
onPressed: () {
|
||||
controller.isClicked.value = !controller.isClicked.value;
|
||||
},
|
||||
)),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user