体征传感器
This commit is contained in:
@@ -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,
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user