Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into fix-issues
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 24 KiB |
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#ffffff</color>
|
||||
</resources>
|
||||
@ -1,122 +1,128 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
"images":[
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"20x20",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-20x20@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"20x20",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-20x20@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"29x29",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-29x29@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"29x29",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-29x29@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"29x29",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-29x29@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"40x40",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-40x40@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"40x40",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-40x40@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"60x60",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-60x60@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"60x60",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-60x60@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"76x76",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-76x76@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"20x20",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-20x20@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"20x20",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-20x20@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"29x29",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-29x29@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"29x29",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-29x29@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"40x40",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-40x40@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"40x40",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-40x40@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"76x76",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-76x76@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"76x76",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-76x76@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"83.5x83.5",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-83.5x83.5@2x.png"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"scale" : "1x",
|
||||
"filename" : "ItunesArtwork@2x.png"
|
||||
}
|
||||
],
|
||||
"info":{
|
||||
"version":1,
|
||||
"author":"easyappicon"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 998 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 181 KiB |
@ -0,0 +1,330 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
|
||||
import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/TextFields.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/card_with_bg_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
class DoctorReplayChat extends StatelessWidget {
|
||||
|
||||
final ListGtMyPatientsQuestions reply;
|
||||
TextEditingController msgController = TextEditingController();
|
||||
|
||||
DoctorReplayChat(
|
||||
{Key key, this.reply,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<DoctorReplayViewModel>(
|
||||
onModelReady: (model) async {},
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
baseViewModel: model,
|
||||
isShowAppBar: false,
|
||||
body: Container(
|
||||
color: Color(0XFFF2F2F2),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 0, right: 5, bottom: 5, top: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
height: 150,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 10, right: 10, bottom: 10),
|
||||
margin: EdgeInsets.only(top: 50),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 1.6 *
|
||||
SizeConfig.textMultiplier,
|
||||
color: Colors.black),
|
||||
children: <TextSpan>[
|
||||
new TextSpan(
|
||||
text: reply.patientName
|
||||
.toString(),
|
||||
style: TextStyle(
|
||||
color: Color(0xFF2B353E),
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: 20)),
|
||||
],
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Icon(FontAwesomeIcons.times,
|
||||
size: 30,
|
||||
color: Color(0xFF2B353E)))
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
// TODO: move to doctor profile
|
||||
},
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 1.6 *
|
||||
SizeConfig.textMultiplier,
|
||||
color: Colors.black),
|
||||
children: <TextSpan>[
|
||||
new TextSpan(
|
||||
text:
|
||||
'Tap here to view patient profile'
|
||||
.toString(),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: 12)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
SizedBox(height: 30,),
|
||||
Container(
|
||||
// color: Color(0xFF2B353E),
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
padding: EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2B353E),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10.0),
|
||||
),
|
||||
border: Border.all(
|
||||
color: HexColor('#707070') ,
|
||||
width: 0.30),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 5),
|
||||
width: 60,
|
||||
height: 60,
|
||||
child: Image.asset(
|
||||
1 == 1
|
||||
? 'assets/images/male_avatar.png'
|
||||
: 'assets/images/female_avatar.png',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
AppText(
|
||||
"07 Jan 2021",
|
||||
fontSize: 2.5 * SizeConfig.textMultiplier,
|
||||
fontFamily: 'Poppins',
|
||||
color: Colors.white,
|
||||
// fontSize: 18
|
||||
),
|
||||
AppText(
|
||||
"07:00 PM",
|
||||
fontSize: 2.5 * SizeConfig.textMultiplier,
|
||||
fontFamily: 'Poppins',
|
||||
color: Colors.white,
|
||||
// fontSize: 18
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.7,
|
||||
child: AppText(
|
||||
"This procedure should be taken only when the patient is below 99o",
|
||||
fontSize: 15,
|
||||
fontFamily: 'Poppins',
|
||||
color: Colors.white,
|
||||
// fontSize: 18
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
// color: Color(0xFF2B353E),
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
padding: EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,// Color(0xFF2B353E),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10.0),
|
||||
),
|
||||
border: Border.all(
|
||||
color: HexColor('#707070') ,
|
||||
width: 0.30),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 5),
|
||||
width: 60,
|
||||
height: 60,
|
||||
child: Image.asset(
|
||||
1 == 1
|
||||
? 'assets/images/male_avatar.png'
|
||||
: 'assets/images/female_avatar.png',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
AppText(
|
||||
"07 Jan 2021",
|
||||
fontSize: 2.5 * SizeConfig.textMultiplier,
|
||||
fontFamily: 'Poppins',
|
||||
color: Color(0xFF2B353E),
|
||||
// fontSize: 18
|
||||
),
|
||||
AppText(
|
||||
"07:00 PM",
|
||||
fontSize: 2.5 * SizeConfig.textMultiplier,
|
||||
fontFamily: 'Poppins',
|
||||
color: Color(0xFF2B353E),
|
||||
// fontSize: 18
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.7,
|
||||
child: AppText(
|
||||
"This procedure should be taken only when the patient is below 99o",
|
||||
fontSize: 15,
|
||||
fontFamily: 'Poppins',
|
||||
color: Color(0xFF2B353E),
|
||||
// fontSize: 18
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
bottomSheet: Container(
|
||||
child:TextFields(
|
||||
hasLabelText: msgController.text != ''
|
||||
? true
|
||||
: false,
|
||||
showLabelText: false,
|
||||
hintText: TranslationBase
|
||||
.of(context)
|
||||
.typeHereToReply,
|
||||
fontSize: 13.5,
|
||||
suffixIcon: FontAwesomeIcons.arrowRight,
|
||||
suffixIconColor: Colors.green,
|
||||
// hintColor: Colors.black,
|
||||
fontWeight: FontWeight.w600,
|
||||
maxLines: 50,
|
||||
minLines: 3,
|
||||
controller: msgController,
|
||||
validator: (value) {
|
||||
if (value == null || value == "")
|
||||
return TranslationBase.of(context)
|
||||
.emptyMessage;
|
||||
else
|
||||
return null;
|
||||
}),
|
||||
height: MediaQuery.of(context).size.height * 0.1,
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
||||
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
class ExpandableSOAPWidget extends StatelessWidget {
|
||||
final bool isExpanded;
|
||||
final Widget child;
|
||||
final Function onTap;
|
||||
final headerTitle;
|
||||
|
||||
const ExpandableSOAPWidget(
|
||||
{Key key, this.isExpanded, this.child, this.onTap, this.headerTitle})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 20, horizontal: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10.0),
|
||||
),
|
||||
border: Border.all(
|
||||
color: HexColor('#707070'),
|
||||
width: 0.30),
|
||||
),
|
||||
child: HeaderBodyExpandableNotifier(
|
||||
headerWidget: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Texts(headerTitle,
|
||||
variant: isExpanded ? "bodyText" : '',
|
||||
bold: isExpanded ? true : false,
|
||||
fontSize: 20,
|
||||
color: Colors.black),
|
||||
Icon(
|
||||
FontAwesomeIcons.asterisk,
|
||||
color: AppGlobal.appPrimaryColor,
|
||||
size: 12,
|
||||
)
|
||||
],
|
||||
),
|
||||
InkWell(
|
||||
onTap: onTap,
|
||||
child: Icon(
|
||||
isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline))
|
||||
],
|
||||
),
|
||||
bodyWidget: child,
|
||||
isExpand: isExpanded,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,149 @@
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
class UpdateChiefComplaints extends StatelessWidget {
|
||||
const UpdateChiefComplaints({
|
||||
Key key,
|
||||
@required this.formKey,
|
||||
@required this.complaintsController,
|
||||
@required this.illnessController,
|
||||
@required this.medicationController,
|
||||
}) : super(key: key);
|
||||
|
||||
final GlobalKey<FormState> formKey;
|
||||
final TextEditingController complaintsController;
|
||||
final TextEditingController illnessController;
|
||||
final TextEditingController medicationController;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Form(
|
||||
key: formKey,
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
||||
Container(
|
||||
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10.0),
|
||||
),
|
||||
border: Border.all(
|
||||
color: HexColor('#707070'),
|
||||
width: 0.30),
|
||||
),
|
||||
child: NewTextFields(
|
||||
hintText: TranslationBase.of(context).addChiefComplaints,
|
||||
controller: complaintsController,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||
child: TextFields(
|
||||
hasLabelText: complaintsController.text != ''
|
||||
? true
|
||||
: false,
|
||||
hintText: TranslationBase
|
||||
.of(context)
|
||||
.addChiefComplaints,
|
||||
fontSize: 13.5,
|
||||
// hintColor: Colors.black,
|
||||
showLabelText: true,
|
||||
fontWeight: FontWeight.w600,
|
||||
maxLines: 25,
|
||||
minLines: 13,
|
||||
controller: complaintsController,
|
||||
validator: (value) {
|
||||
if (value == null || value == "")
|
||||
return TranslationBase.of(context)
|
||||
.emptyMessage;
|
||||
else if (value.length < 25)
|
||||
return TranslationBase
|
||||
.of(context)
|
||||
.chiefComplaintLength;
|
||||
//"";
|
||||
else
|
||||
return null;
|
||||
}),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||
child: TextFields(
|
||||
hasLabelText:
|
||||
illnessController.text != '' ? true : false,
|
||||
showLabelText: true,
|
||||
hintText: TranslationBase
|
||||
.of(context)
|
||||
.historyOfPresentIllness,
|
||||
fontSize: 13.5,
|
||||
// hintColor: Colors.black,
|
||||
fontWeight: FontWeight.w600,
|
||||
maxLines: 25,
|
||||
minLines: 13,
|
||||
controller: illnessController,
|
||||
validator: (value) {
|
||||
if (value == null || value == "")
|
||||
return TranslationBase.of(context)
|
||||
.emptyMessage;
|
||||
else
|
||||
return null;
|
||||
}),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
UpdateMedicationWidget(
|
||||
medicationController: medicationController,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||
child: TextFields(
|
||||
hasLabelText: medicationController.text != ''
|
||||
? true
|
||||
: false,
|
||||
showLabelText: true,
|
||||
hintText: TranslationBase
|
||||
.of(context)
|
||||
.currentMedications,
|
||||
fontSize: 13.5,
|
||||
// hintColor: Colors.black,
|
||||
fontWeight: FontWeight.w600,
|
||||
maxLines: 23,
|
||||
minLines: 10,
|
||||
controller: medicationController,
|
||||
validator: (value) {
|
||||
if (value == null || value == "")
|
||||
return TranslationBase
|
||||
.of(context)
|
||||
.emptyMessage;
|
||||
else
|
||||
return null;
|
||||
}),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
]),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,229 @@
|
||||
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class NumberTextInputFormatter extends TextInputFormatter {
|
||||
@override
|
||||
TextEditingValue formatEditUpdate(
|
||||
TextEditingValue oldValue, TextEditingValue newValue) {
|
||||
final int newTextLength = newValue.text.length;
|
||||
int selectionIndex = newValue.selection.end;
|
||||
int usedSubstringIndex = 0;
|
||||
final StringBuffer newText = StringBuffer();
|
||||
if (newTextLength >= 1) {
|
||||
newText.write('(');
|
||||
if (newValue.selection.end >= 1) selectionIndex++;
|
||||
}
|
||||
if (newTextLength >= 4) {
|
||||
newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') ');
|
||||
if (newValue.selection.end >= 3) selectionIndex += 2;
|
||||
}
|
||||
if (newTextLength >= 7) {
|
||||
newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-');
|
||||
if (newValue.selection.end >= 6) selectionIndex++;
|
||||
}
|
||||
if (newTextLength >= 11) {
|
||||
newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' ');
|
||||
if (newValue.selection.end >= 10) selectionIndex++;
|
||||
}
|
||||
// Dump the rest.
|
||||
if (newTextLength >= usedSubstringIndex)
|
||||
newText.write(newValue.text.substring(usedSubstringIndex));
|
||||
return TextEditingValue(
|
||||
text: newText.toString(),
|
||||
selection: TextSelection.collapsed(offset: selectionIndex),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
final _mobileFormatter = NumberTextInputFormatter();
|
||||
|
||||
class NewTextFields extends StatefulWidget {
|
||||
NewTextFields(
|
||||
{Key key,
|
||||
this.type,
|
||||
this.hintText,
|
||||
this.suffixIcon,
|
||||
this.autoFocus,
|
||||
this.onChanged,
|
||||
this.initialValue,
|
||||
this.minLines,
|
||||
this.maxLines,
|
||||
this.inputFormatters,
|
||||
this.padding,
|
||||
this.focus = false,
|
||||
this.maxLengthEnforced = true,
|
||||
this.suffixIconColor,
|
||||
this.inputAction,
|
||||
this.onSubmit,
|
||||
this.keepPadding = true,
|
||||
this.textCapitalization = TextCapitalization.none,
|
||||
this.controller,
|
||||
this.keyboardType,
|
||||
this.validator,
|
||||
this.borderOnlyError = false,
|
||||
this.onSaved,
|
||||
this.onSuffixTap,
|
||||
this.readOnly: false,
|
||||
this.maxLength,
|
||||
this.prefixIcon,
|
||||
this.bare = false,
|
||||
this.onTap,
|
||||
this.fontSize = 16.0,
|
||||
this.fontWeight = FontWeight.w700,
|
||||
this.autoValidate = false,
|
||||
this.hintColor,
|
||||
this.isEnabled = true})
|
||||
: super(key: key);
|
||||
|
||||
final String hintText;
|
||||
|
||||
// final String initialValue;
|
||||
final String type;
|
||||
final bool autoFocus;
|
||||
final IconData suffixIcon;
|
||||
final Color suffixIconColor;
|
||||
final Icon prefixIcon;
|
||||
final VoidCallback onTap;
|
||||
final TextEditingController controller;
|
||||
final TextInputType keyboardType;
|
||||
final FormFieldValidator validator;
|
||||
final Function onSaved;
|
||||
final Function onSuffixTap;
|
||||
final Function onChanged;
|
||||
final Function onSubmit;
|
||||
final bool readOnly;
|
||||
final int maxLength;
|
||||
final int minLines;
|
||||
final int maxLines;
|
||||
final bool maxLengthEnforced;
|
||||
final bool bare;
|
||||
final bool isEnabled;
|
||||
final TextInputAction inputAction;
|
||||
final double fontSize;
|
||||
final FontWeight fontWeight;
|
||||
final bool keepPadding;
|
||||
final TextCapitalization textCapitalization;
|
||||
final List<TextInputFormatter> inputFormatters;
|
||||
final bool autoValidate;
|
||||
final EdgeInsets padding;
|
||||
final bool focus;
|
||||
final bool borderOnlyError;
|
||||
final Color hintColor;
|
||||
final String initialValue;
|
||||
@override
|
||||
_NewTextFieldsState createState() => _NewTextFieldsState();
|
||||
}
|
||||
|
||||
class _NewTextFieldsState extends State<NewTextFields> {
|
||||
final FocusNode _focusNode = FocusNode();
|
||||
bool focus = false;
|
||||
bool view = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_focusNode.addListener(() {
|
||||
setState(() {
|
||||
focus = _focusNode.hasFocus;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(NewTextFields oldWidget) {
|
||||
if (widget.focus) _focusNode.requestFocus();
|
||||
super.didUpdateWidget(oldWidget);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_focusNode.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
bool _determineReadOnly() {
|
||||
if (widget.readOnly != null && widget.readOnly) {
|
||||
_focusNode.unfocus();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedContainer(
|
||||
duration: Duration(milliseconds: 300),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
color: Colors.white),
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 8),
|
||||
child: TextFormField(
|
||||
enabled: widget.isEnabled,
|
||||
initialValue: widget.initialValue,
|
||||
keyboardAppearance: Theme.of(context).brightness,
|
||||
scrollPhysics: BouncingScrollPhysics(),
|
||||
autovalidate: widget.autoValidate,
|
||||
textCapitalization: widget.textCapitalization,
|
||||
onFieldSubmitted: widget.inputAction == TextInputAction.next
|
||||
? (widget.onSubmit != null
|
||||
? widget.onSubmit
|
||||
: (val) {
|
||||
_focusNode.nextFocus();
|
||||
})
|
||||
: widget.onSubmit,
|
||||
textInputAction: widget.inputAction,
|
||||
minLines: widget.minLines ?? 1,
|
||||
maxLines: widget.maxLines ?? 1,
|
||||
maxLengthEnforced: widget.maxLengthEnforced,
|
||||
onChanged: widget.onChanged,
|
||||
focusNode: _focusNode,
|
||||
maxLength: widget.maxLength ?? null,
|
||||
controller: widget.controller,
|
||||
keyboardType: widget.keyboardType,
|
||||
readOnly: _determineReadOnly(),
|
||||
obscureText: widget.type == "password" && !view ? true : false,
|
||||
autofocus: widget.autoFocus ?? false,
|
||||
validator: widget.validator,
|
||||
onSaved: widget.onSaved,
|
||||
style: Theme.of(context).textTheme.body2.copyWith(
|
||||
fontSize: widget.fontSize, fontWeight: widget.fontWeight),
|
||||
inputFormatters: widget.keyboardType == TextInputType.phone
|
||||
? <TextInputFormatter>[
|
||||
WhitelistingTextInputFormatter.digitsOnly,
|
||||
_mobileFormatter,
|
||||
]
|
||||
: widget.inputFormatters,
|
||||
decoration: InputDecoration(
|
||||
labelText: widget.hintText,
|
||||
labelStyle:
|
||||
TextStyle(color: Theme.of(context).textTheme.bodyText1.color),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).errorColor.withOpacity(0.5),
|
||||
width: 1.0),
|
||||
borderRadius: BorderRadius.circular(12.0)),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Theme.of(context).errorColor.withOpacity(0.5),
|
||||
width: 1.0),
|
||||
borderRadius: BorderRadius.circular(8.0)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.white, width: 1.0),
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
disabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.white, width: 1.0),
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.white, width: 1.0),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||