Merge branches 'development' and 'progress_note' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into progress_note

merge-requests/567/head
Elham Rababah 5 years ago
commit 220ea803ff

@ -20,6 +20,7 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils
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:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
@ -57,6 +58,12 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
});
}
@override
void initState() {
requestPermissions();
super.initState();
}
@override
Widget build(BuildContext context) {
if (widget.note != null) {
@ -225,6 +232,12 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....';
}
void requestPermissions() async {
Map<Permission, PermissionStatus> statuses = await [
Permission.microphone,
].request();
}
void resultListener(result) {
reconizedWord = result.recognizedWords;
event.setValue({"searchText": reconizedWord});

@ -114,6 +114,7 @@ class AddSickLeavScreen extends StatelessWidget {
children: model.getAllSIckLeave
.map<Widget>((GetAllSickLeaveResponse item) {
return RoundedContainer(
margin: EdgeInsets.all(10),
child: Column(
children: [
Container(
@ -129,7 +130,8 @@ class AddSickLeavScreen extends StatelessWidget {
))),
padding: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 4,
@ -149,13 +151,15 @@ class AddSickLeavScreen extends StatelessWidget {
context)
.hold
: item.status == 2
? TranslationBase.of(
? TranslationBase
.of(
context)
.active
: TranslationBase.of(
context)
: TranslationBase
.of(context)
.all,
fontWeight: FontWeight.bold,
fontWeight:
FontWeight.bold,
color: item.status == 1
? Colors.yellow[800]
: item.status == 2
@ -165,19 +169,23 @@ class AddSickLeavScreen extends StatelessWidget {
),
Row(
children: [
AppText(TranslationBase.of(
AppText(
TranslationBase.of(
context)
.daysSickleave),
AppText(
item.noOfDays.toString(),
fontWeight: FontWeight.bold,
item.noOfDays
.toString(),
fontWeight:
FontWeight.bold,
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
TranslationBase.of(
context)
.startDate +
' ',
),
@ -187,7 +195,8 @@ class AddSickLeavScreen extends StatelessWidget {
.convertStringToDateFormat(
item.startDate,
'dd-MMM-yyyy'),
fontWeight: FontWeight.bold,
fontWeight:
FontWeight.bold,
))
],
),

@ -43,6 +43,7 @@ class ShowSickLeaveScreen extends StatelessWidget {
children: model.getAllSIckLeave
.map<Widget>((GetAllSickLeaveResponse item) {
return RoundedContainer(
margin: EdgeInsets.all(10),
child: Column(
children: [
Container(
@ -58,7 +59,8 @@ class ShowSickLeaveScreen extends StatelessWidget {
))),
padding: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 4,
@ -78,13 +80,15 @@ class ShowSickLeaveScreen extends StatelessWidget {
context)
.hold
: item.status == 2
? TranslationBase.of(
? TranslationBase
.of(
context)
.active
: TranslationBase.of(
context)
: TranslationBase
.of(context)
.all,
fontWeight: FontWeight.bold,
fontWeight:
FontWeight.bold,
color: item.status == 1
? Colors.yellow[800]
: item.status == 2
@ -94,19 +98,23 @@ class ShowSickLeaveScreen extends StatelessWidget {
),
Row(
children: [
AppText(TranslationBase.of(
AppText(
TranslationBase.of(
context)
.daysSickleave),
AppText(
item.noOfDays.toString(),
fontWeight: FontWeight.bold,
item.noOfDays
.toString(),
fontWeight:
FontWeight.bold,
),
],
),
Row(
children: [
AppText(
TranslationBase.of(context)
TranslationBase.of(
context)
.startDate +
' ',
),
@ -116,7 +124,8 @@ class ShowSickLeaveScreen extends StatelessWidget {
.convertStringToDateFormat(
item.startDate,
'dd-MMM-yyyy'),
fontWeight: FontWeight.bold,
fontWeight:
FontWeight.bold,
))
],
),
@ -134,13 +143,13 @@ class ShowSickLeaveScreen extends StatelessWidget {
'assets/images/edit.png'),
// color: Colors.green, //Colors.black,
onPressed: () => {
onPressed: () =>
{
if (item.status ==
1)
{
DrAppToastMsg.showErrorToast(
TranslationBase.of(
context)
TranslationBase.of(context)
.sickleaveonhold)
}
// else

@ -267,7 +267,7 @@ class PatientCard extends StatelessWidget {
fontWeight: FontWeight.w700,
fontSize: 15)),
]))),
if (isInpatient == true)
Row(
children: [
AppText(

Loading…
Cancel
Save