This commit is contained in:
Hamza-Ayed
2024-02-14 22:31:28 +03:00
parent bbd4ce792e
commit ea7a5bb931
28 changed files with 941 additions and 605 deletions

View File

@@ -6,6 +6,7 @@ import 'package:ride/constant/box_name.dart';
import 'package:ride/constant/links.dart';
import 'package:ride/controller/functions/crud.dart';
import 'package:ride/main.dart';
import 'package:ride/views/widgets/my_textField.dart';
import '../../views/widgets/elevated_btn.dart';
@@ -37,24 +38,30 @@ class ProfileController extends GetxController {
update();
}
updatField(String columnName) async {
updatField(String columnName, TextInputType type) async {
Get.defaultDialog(
title: '${'Update'.tr} $columnName',
content: Column(
children: [
SizedBox(
width: Get.width * .7,
child: TextField(
controller: txtController,
decoration: const InputDecoration(
border: OutlineInputBorder(), hintText: 'type here'),
),
),
width: Get.width * .7,
child: MyTextForm(
controller: txtController,
label: 'type here'.tr,
hint: 'type here',
type: type)
// TextField(
// controller: txtController,
// decoration: const InputDecoration(
// border: OutlineInputBorder(), hintText: 'type here'),
// ),
),
MyElevatedButton(
title: 'Update'.tr,
onPressed: () {
updateColumn({
'id': prfoileData['id'].toString(),
'id': box.read(BoxName.passengerID),
columnName: txtController.text,
});
if (columnName == 'first_name') {