Merge branch 'confirmation_page' into 'development'
first step form confirmation page See merge request Cloud_Solution/doctor_app_flutter!870merge-requests/869/merge
commit
ac1b4d9865
@ -0,0 +1,87 @@
|
||||
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomEditableText extends StatefulWidget {
|
||||
CustomEditableText({
|
||||
Key key,
|
||||
@required this.controller,
|
||||
this.hint,
|
||||
this.isEditable = false,
|
||||
}) : super(key: key);
|
||||
|
||||
final TextEditingController controller;
|
||||
|
||||
final String hint;
|
||||
bool isEditable;
|
||||
|
||||
@override
|
||||
_CustomEditableTextState createState() => _CustomEditableTextState();
|
||||
}
|
||||
|
||||
class _CustomEditableTextState extends State<CustomEditableText> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
if(!widget.isEditable)
|
||||
Container(
|
||||
height: 60,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[300],
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
border: Border.fromBorderSide(
|
||||
BorderSide(
|
||||
color: Colors.grey[300],
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(widget.hint, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
widget.controller.text,
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
InkWell(
|
||||
child: Icon(
|
||||
DoctorApp.edit_1,
|
||||
size: 20,
|
||||
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.isEditable = true;
|
||||
});
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if(widget.isEditable)
|
||||
AppTextFieldCustom(
|
||||
hintText: widget.hint,
|
||||
//TranslationBase.of(context).addoperationReports,
|
||||
controller: widget.controller,
|
||||
maxLines: 1,
|
||||
minLines: 1,
|
||||
hasBorder: true,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,345 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/model/note/CreateNoteModel.dart';
|
||||
import 'package:doctor_app_flutter/core/model/note/note_model.dart';
|
||||
import 'package:doctor_app_flutter/core/model/note/update_note_model.dart';
|
||||
import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/operation_report_view_model.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/create_update_operation_report_request_model.dart';
|
||||
import 'package:doctor_app_flutter/models/operation_report/get_operation_report_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
|
||||
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
||||
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/speech-text-popup.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:speech_to_text/speech_recognition_error.dart';
|
||||
import 'package:speech_to_text/speech_to_text.dart' as stt;
|
||||
|
||||
import 'CustomEditableText.dart';
|
||||
|
||||
class RegisterConfirmationPatientPage extends StatefulWidget {
|
||||
final GetOperationReportModel operationReport;
|
||||
final OperationReportViewModel operationReportViewModel;
|
||||
final PatiantInformtion patient;
|
||||
final int visitType;
|
||||
final bool isUpdate;
|
||||
|
||||
const RegisterConfirmationPatientPage(
|
||||
{Key key,
|
||||
this.operationReportViewModel,
|
||||
this.patient,
|
||||
this.visitType,
|
||||
this.isUpdate,
|
||||
this.operationReport})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_RegisterConfirmationPatientPageState createState() =>
|
||||
_RegisterConfirmationPatientPageState();
|
||||
}
|
||||
|
||||
class _RegisterConfirmationPatientPageState
|
||||
extends State<RegisterConfirmationPatientPage> {
|
||||
int selectedType;
|
||||
bool isSubmitted = false;
|
||||
stt.SpeechToText speech = stt.SpeechToText();
|
||||
var reconizedWord;
|
||||
var event = RobotProvider();
|
||||
ProjectViewModel projectViewModel;
|
||||
TextEditingController firstName = TextEditingController(text: "Elham");
|
||||
TextEditingController middleName = TextEditingController(text: "Ali");
|
||||
TextEditingController lastName = TextEditingController(text: "Rababah");
|
||||
TextEditingController emailAddressController = TextEditingController(text: "Elham@Rababah.com");
|
||||
|
||||
setSelectedType(int val) {
|
||||
setState(() {
|
||||
selectedType = val;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
projectViewModel = Provider.of(context);
|
||||
return AppScaffold(
|
||||
isShowAppBar: false,
|
||||
backgroundColor: Color(0xFFF8F8F8),
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height * 1.0,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(0.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Center(
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: 0.9,
|
||||
child: Column(
|
||||
children: [
|
||||
CustomEditableText(
|
||||
controller: firstName, hint: TranslationBase.of(context).firstName),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
CustomEditableText(
|
||||
controller: middleName, hint: TranslationBase.of(context).middleName),
|
||||
SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
CustomEditableText(
|
||||
controller: lastName, hint: TranslationBase.of(context).lastName),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
||||
FractionallySizedBox(
|
||||
widthFactor: .9,
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).healthID, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"123456",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).identityNumber, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"ss",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20,)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).nationality, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"Jordanian",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).occupation, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"--",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20,)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(TranslationBase.of(context).mobileNo, fontSize: 12, color: Colors.black),
|
||||
AppText(
|
||||
"075XXXXXX",
|
||||
fontSize: 12,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20,)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
AppTextFieldCustom(
|
||||
height: Helpers.getTextFieldHeight(),
|
||||
enabled: false,
|
||||
onClick: () {
|
||||
// MasterKeyDailog dialog =
|
||||
// MasterKeyDailog(
|
||||
// list:
|
||||
// model.medicationDoseTimeList,
|
||||
// okText:
|
||||
// TranslationBase.of(context)
|
||||
// .ok,
|
||||
// selectedValue:
|
||||
// _selectedMedicationDose,
|
||||
// okFunction: (selectedValue) {
|
||||
// setState(() {
|
||||
// _selectedMedicationDose =
|
||||
// selectedValue;
|
||||
//
|
||||
// doseController
|
||||
// .text = projectViewModel
|
||||
// .isArabic
|
||||
// ? _selectedMedicationDose
|
||||
// .nameAr
|
||||
// : _selectedMedicationDose
|
||||
// .nameEn;
|
||||
// });
|
||||
// },
|
||||
// );
|
||||
// showDialog(
|
||||
// barrierDismissible: false,
|
||||
// context: context,
|
||||
// builder: (BuildContext context) {
|
||||
// return dialog;
|
||||
// },
|
||||
// );
|
||||
},
|
||||
hintText:
|
||||
TranslationBase.of(context).maritalStatus,
|
||||
maxLines: 1,
|
||||
minLines: 1,
|
||||
isTextFieldHasSuffix: true,
|
||||
// controller: doseController,
|
||||
// validationError: isFormSubmitted &&
|
||||
// _selectedMedicationDose == null
|
||||
// ? TranslationBase.of(context)
|
||||
// .emptyMessage
|
||||
// : null,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
AppTextFieldCustom(
|
||||
height: Helpers.getTextFieldHeight(),
|
||||
enabled: false,
|
||||
onClick: () {
|
||||
// MasterKeyDailog dialog =
|
||||
// MasterKeyDailog(
|
||||
// list:
|
||||
// model.medicationDoseTimeList,
|
||||
// okText:
|
||||
// TranslationBase.of(context)
|
||||
// .ok,
|
||||
// selectedValue:
|
||||
// _selectedMedicationDose,
|
||||
// okFunction: (selectedValue) {
|
||||
// setState(() {
|
||||
// _selectedMedicationDose =
|
||||
// selectedValue;
|
||||
//
|
||||
// doseController
|
||||
// .text = projectViewModel
|
||||
// .isArabic
|
||||
// ? _selectedMedicationDose
|
||||
// .nameAr
|
||||
// : _selectedMedicationDose
|
||||
// .nameEn;
|
||||
// });
|
||||
// },
|
||||
// );
|
||||
// showDialog(
|
||||
// barrierDismissible: false,
|
||||
// context: context,
|
||||
// builder: (BuildContext context) {
|
||||
// return dialog;
|
||||
// },
|
||||
// );
|
||||
},
|
||||
hintText:
|
||||
TranslationBase.of(context).lanEnglish,
|
||||
maxLines: 1,
|
||||
minLines: 1,
|
||||
isTextFieldHasSuffix: true,
|
||||
// controller: doseController,
|
||||
// validationError: isFormSubmitted &&
|
||||
// _selectedMedicationDose == null
|
||||
// ? TranslationBase.of(context)
|
||||
// .emptyMessage
|
||||
// : null,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
AppTextFieldCustom(
|
||||
hintText: "Email Address",
|
||||
//TranslationBase.of(context).addoperationReports,
|
||||
controller: emailAddressController,
|
||||
maxLines: 1,
|
||||
minLines: 1,
|
||||
hasBorder: true,
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 400,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue