体征传感器

This commit is contained in:
czz
2025-07-19 17:52:39 +08:00
parent 594b1f31e0
commit 1480b2e708
17 changed files with 1130 additions and 795 deletions

View File

@@ -110,51 +110,60 @@ class LanguagePage extends GetView<MHLanguageController> {
}
Widget _buildItem(BuildContext context, int index, MHLanguageModel model) {
return Container(
// width: bodysize!.maxWidth * 1,
height: bodysize!.maxHeight * 0.055,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
model.language_name ?? "",
style: TextStyle(color: Colors.white, fontSize: 30.rpx),
),
Theme(
data: ThemeData(
checkboxTheme: CheckboxThemeData(
visualDensity: VisualDensity.compact,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
),
return GestureDetector(
onTap: () {
controller.selectLanguage.value = model;
},
child: Container(
height: bodysize!.maxHeight * 0.055,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
model.language_name ?? "",
style: TextStyle(color: Colors.white, fontSize: 30.rpx),
),
child: Obx(() {
return Checkbox(
value: controller.selectLanguage.value?.language_code ==
model.language_code,
onChanged: (newValue) async {
controller.selectLanguage.value = model;
// if (newValue!) {
// selectLanguage!.value = languageMap[
// text]!; // Set selectLanguage to the current text value
// } else {
// selectLanguage!.value =
// ''; // Clear selection if unchecked
// }
},
shape: CircleBorder(),
side: BorderSide(
width: 2,
// color: FlutterFlowTheme.of(context).alternate,
Obx(() {
double h = 33.rpx;
bool check = controller.selectLanguage.value?.language_code ==
model.language_code;
return Container(
height: 33.rpx,
child: AspectRatio(
aspectRatio: 1,
child: Center(
child: Container(
height: h,
width: h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(h / 2),
border: Border.all(
width: check ? 1 : 0.5,
color: Color(0xFFC8CBD2),
),
),
child: check
? Center(
child: ClipOval(
child: Container(
width: h * 0.6,
height: h * 0.6,
color: const Color(0xFF6BFDAC),
),
),
)
: null,
),
),
),
activeColor: Color(0XFF6BFDAC),
// checkColor: FlutterFlowTheme.of(context).info,
);
})),
],
),
);
}),
],
),
)
// width: bodysize!.maxWidth * 1,
);
}
}