2/14/1
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user