更新法语语言包
This commit is contained in:
@@ -249,158 +249,170 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
|
||||
// actYMax: max.toDouble(),
|
||||
),
|
||||
),
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(
|
||||
// 30.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
// children: [
|
||||
// Column(
|
||||
// children: [
|
||||
// Text(
|
||||
// "${avgHeartRate['name']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc3,
|
||||
// fontSize:
|
||||
// AppConstants().normal_text_fontSize),
|
||||
// ),
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// Text(
|
||||
// "${avgHeartRate['value']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc2,
|
||||
// fontSize: AppConstants()
|
||||
// .normal_text_fontSize),
|
||||
// ),
|
||||
// Text(
|
||||
// "${avgHeartRate['unit']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc3,
|
||||
// fontSize:
|
||||
// AppConstants().small_text_fontSize),
|
||||
// ),
|
||||
// ].divide(SizedBox(
|
||||
// width: 6.rpx,
|
||||
// )),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// Column(
|
||||
// children: [
|
||||
// Text(
|
||||
// "${baseHeartRate['name']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc3,
|
||||
// fontSize:
|
||||
// AppConstants().normal_text_fontSize),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// Text(
|
||||
// "${baseHeartRate['value']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc2,
|
||||
// fontSize: AppConstants()
|
||||
// .normal_text_fontSize),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// Text(
|
||||
// "${baseHeartRate['unit']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc3,
|
||||
// fontSize:
|
||||
// AppConstants().small_text_fontSize),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// ].divide(SizedBox(
|
||||
// width: 6.rpx,
|
||||
// )),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// Column(
|
||||
// children: [
|
||||
// Text(
|
||||
// "${minHeartRate['name']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc3,
|
||||
// fontSize:
|
||||
// AppConstants().normal_text_fontSize),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// Text(
|
||||
// "${minHeartRate['value']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc2,
|
||||
// fontSize: AppConstants()
|
||||
// .normal_text_fontSize),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// Text(
|
||||
// "${minHeartRate['unit']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc3,
|
||||
// fontSize:
|
||||
// AppConstants().small_text_fontSize),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// ].divide(SizedBox(
|
||||
// width: 6.rpx,
|
||||
// )),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// Column(
|
||||
// children: [
|
||||
// Text(
|
||||
// "${maxHeartRate['name']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc3,
|
||||
// fontSize:
|
||||
// AppConstants().normal_text_fontSize),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// Text(
|
||||
// "${maxHeartRate['value']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc2,
|
||||
// fontSize: AppConstants()
|
||||
// .normal_text_fontSize),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// Text(
|
||||
// "${maxHeartRate['unit']}",
|
||||
// style: TextStyle(
|
||||
// color: themeController.currentColor.sc3,
|
||||
// fontSize:
|
||||
// AppConstants().small_text_fontSize),
|
||||
// maxLines: 1,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// ].divide(SizedBox(
|
||||
// width: 6.rpx,
|
||||
// )),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${avgHeartRate['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${avgHeartRate['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize),
|
||||
),
|
||||
Text(
|
||||
"${avgHeartRate['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${baseHeartRate['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${baseHeartRate['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"${baseHeartRate['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${minHeartRate['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${minHeartRate['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"${minHeartRate['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${maxHeartRate['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${maxHeartRate['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"${maxHeartRate['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
_buildHeartRateItem(avgHeartRate),
|
||||
_buildHeartRateItem(baseHeartRate),
|
||||
_buildHeartRateItem(minHeartRate),
|
||||
_buildHeartRateItem(maxHeartRate),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -418,4 +430,70 @@ class _HeartRateStandardWidgetState extends State<HeartRateStandardWidget> {
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildHeartRateItem(Map<String, dynamic> data) {
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 4.rpx, vertical: 4.rpx),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
// 名称 - 最多2行
|
||||
Flexible(
|
||||
child: Text(
|
||||
"${data['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4.rpx),
|
||||
// 值 + 单位 - 最多2行
|
||||
Flexible(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Flexible(
|
||||
fit: FlexFit.loose,
|
||||
child: Text(
|
||||
"${data['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize: AppConstants().normal_text_fontSize,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 6.rpx),
|
||||
Flexible(
|
||||
fit: FlexFit.loose,
|
||||
child: Text(
|
||||
"${data['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().small_text_fontSize,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user