Перевёл виджеты ввода
This commit is contained in:
parent
10ac93eeb6
commit
1051ac57e0
1 changed files with 13 additions and 13 deletions
|
|
@ -6,7 +6,7 @@ Future<String?> showStringInputDialog({String? originalValue}) async {
|
|||
final strVal = (originalValue ?? "").obs;
|
||||
return await Get.dialog<String>(
|
||||
AlertDialog(
|
||||
title: const Text("Enter a string"),
|
||||
title: const Text("Введите строку"),
|
||||
content: TextField(
|
||||
controller: TextEditingController(text: originalValue),
|
||||
onChanged: (value) {
|
||||
|
|
@ -18,13 +18,13 @@ Future<String?> showStringInputDialog({String? originalValue}) async {
|
|||
onPressed: () {
|
||||
Get.back(result: null);
|
||||
},
|
||||
child: const Text("Cancel"),
|
||||
child: const Text("Отменить"),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Get.back(result: strVal.value);
|
||||
},
|
||||
child: const Text("OK"),
|
||||
child: const Text("Ок"),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -35,7 +35,7 @@ Future<double?> showDoubleInputDialog({double? originalValue}) async {
|
|||
final strVal = (originalValue?.toString() ?? "").obs;
|
||||
return await Get.dialog<double>(
|
||||
AlertDialog(
|
||||
title: const Text("Enter a number"),
|
||||
title: const Text("Введите плавающее число"),
|
||||
content: FastTextField(
|
||||
name: "Number",
|
||||
initialValue: originalValue?.toString(),
|
||||
|
|
@ -43,11 +43,11 @@ Future<double?> showDoubleInputDialog({double? originalValue}) async {
|
|||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return "Please enter a number";
|
||||
return "Пожалуйста, введите плавающее число";
|
||||
}
|
||||
final parsed = double.tryParse(value);
|
||||
if (parsed == null) {
|
||||
return "Please enter a valid number";
|
||||
return "Пожалуйста, введите настоящее плавающее число";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
|
@ -60,7 +60,7 @@ Future<double?> showDoubleInputDialog({double? originalValue}) async {
|
|||
onPressed: () {
|
||||
Get.back(result: null);
|
||||
},
|
||||
child: const Text("Cancel"),
|
||||
child: const Text("Отменить"),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
|
|
@ -71,7 +71,7 @@ Future<double?> showDoubleInputDialog({double? originalValue}) async {
|
|||
Get.back(result: null);
|
||||
}
|
||||
},
|
||||
child: const Text("OK"),
|
||||
child: const Text("Ок"),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -82,7 +82,7 @@ Future<int?> showIntInputDialog({int? originalValue}) async {
|
|||
final strVal = (originalValue?.toString() ?? "").obs;
|
||||
return await Get.dialog<int>(
|
||||
AlertDialog(
|
||||
title: const Text("Enter a number"),
|
||||
title: const Text("Введите целое число"),
|
||||
content: FastTextField(
|
||||
name: "Number",
|
||||
initialValue: originalValue?.toString(),
|
||||
|
|
@ -90,11 +90,11 @@ Future<int?> showIntInputDialog({int? originalValue}) async {
|
|||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return "Please enter a number";
|
||||
return "Пожалуйста, введите целое число";
|
||||
}
|
||||
final parsed = int.tryParse(value);
|
||||
if (parsed == null) {
|
||||
return "Please enter a valid number";
|
||||
return "Пожалуйста, введите настоящее целое число";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
|
@ -107,7 +107,7 @@ Future<int?> showIntInputDialog({int? originalValue}) async {
|
|||
onPressed: () {
|
||||
Get.back(result: null);
|
||||
},
|
||||
child: const Text("Cancel"),
|
||||
child: const Text("Отменить"),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
|
|
@ -118,7 +118,7 @@ Future<int?> showIntInputDialog({int? originalValue}) async {
|
|||
Get.back(result: null);
|
||||
}
|
||||
},
|
||||
child: const Text("OK"),
|
||||
child: const Text("Ок"),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue