|
@@ -3,6 +3,7 @@ import 'package:fis_i18n/i18n.dart';
|
|
|
import 'package:fis_jsonrpc/services/remedical.m.dart';
|
|
|
import 'package:fis_measure/interfaces/process/items/item_metas.dart';
|
|
|
import 'package:fis_measure/process/items/item_meta_convert.dart';
|
|
|
+import 'package:fis_measure/process/language/measure_language.dart';
|
|
|
import 'package:fis_measure/view/mobile_view/mobile_right_panel/mobile_measure_tool.dart';
|
|
|
import 'package:fis_ui/index.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
@@ -25,6 +26,9 @@ class _MobileMoreMeasureItemDialogState
|
|
|
final scrollController = ScrollController();
|
|
|
final searchBarController = TextEditingController();
|
|
|
|
|
|
+ /// 测量语言包
|
|
|
+ final measureLanguage = MeasureLanguage();
|
|
|
+
|
|
|
/// 当前模式的下标
|
|
|
int currentModeIndex = 0;
|
|
|
|
|
@@ -63,13 +67,7 @@ class _MobileMoreMeasureItemDialogState
|
|
|
/// 构建更多测量项弹窗容器
|
|
|
FWidget _buildMoreMeasureItemDialog() {
|
|
|
return FDialog(
|
|
|
- // title: _buildDialogTitle(),
|
|
|
- // titleColor: const Color.fromARGB(255, 36, 36, 36),
|
|
|
backgroundColor: const Color.fromARGB(255, 36, 36, 36),
|
|
|
- // isDefault: false,
|
|
|
- // onCancel: () {
|
|
|
- // Get.back();
|
|
|
- // },
|
|
|
shape: const RoundedRectangleBorder(
|
|
|
borderRadius: BorderRadius.all(
|
|
|
Radius.circular(7),
|
|
@@ -93,16 +91,6 @@ class _MobileMoreMeasureItemDialogState
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
- // bottomButton: FContainer(
|
|
|
- // height: 20,
|
|
|
- // decoration: const BoxDecoration(
|
|
|
- // color: Color.fromARGB(255, 36, 36, 36),
|
|
|
- // borderRadius: BorderRadius.only(
|
|
|
- // bottomLeft: Radius.circular(7),
|
|
|
- // bottomRight: Radius.circular(7),
|
|
|
- // ),
|
|
|
- // ),
|
|
|
- // ),
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -196,6 +184,10 @@ class _MobileMoreMeasureItemDialogState
|
|
|
ItemMetaDTO itemMeta,
|
|
|
) {
|
|
|
final bool isActive = widget.activeItemName == itemMeta.name;
|
|
|
+ String displayName = itemMeta.name ?? '';
|
|
|
+ if (i18nBook.isCurrentChinese) {
|
|
|
+ displayName = measureLanguage.t('measure', itemMeta.description ?? '');
|
|
|
+ }
|
|
|
return FInkWell(
|
|
|
onTap: () {
|
|
|
if (isActive) return;
|
|
@@ -214,12 +206,14 @@ class _MobileMoreMeasureItemDialogState
|
|
|
child: Container(
|
|
|
decoration: BoxDecoration(
|
|
|
border: Border.all(
|
|
|
- color: isActive ? Colors.white : Color.fromARGB(255, 71, 71, 71)),
|
|
|
+ color: isActive
|
|
|
+ ? Colors.white
|
|
|
+ : const Color.fromARGB(255, 71, 71, 71)),
|
|
|
borderRadius: BorderRadius.circular(4),
|
|
|
),
|
|
|
child: FCenter(
|
|
|
child: FText(
|
|
|
- itemMeta.name ?? '',
|
|
|
+ displayName,
|
|
|
textAlign: TextAlign.center,
|
|
|
style: TextStyle(
|
|
|
fontSize: 12,
|